Home > freetb4matlab > strings > strmatch.m

strmatch

PURPOSE ^

% Return indices of entries of @var{a} that match the string @var{s}.

SYNOPSIS ^

function idx = strmatch (s, A, exact)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} strmatch (@var{s}, @var{a}, 'exact')
% Return indices of entries of @var{a} that match the string @var{s}.
% The second argument @var{a} may be a string matrix or a cell array of
% strings.  If the third argument @code{'exact'} is not given, then
% @var{s} only needs to match @var{a} up to the length of @var{s}.  Nul
% characters match blanks.  Results are returned as a column vector. 
% For example:
%
% @example
% @group
% strmatch ('apple', 'apple juice')
%      @result{} 1
%
% strmatch ('apple', ['apple pie'; 'apple juice'; 'an apple'])
%      @result{} [1; 2]
%
% strmatch ('apple', @{'apple pie'; 'apple juice'; 'tomato'@})
%      @result{} [1; 2]
% @end group
% @end example
% @seealso{strfind, findstr, strcmp, strncmp, strcmpi, strncmpi, find}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003