Home > freetb4matlab > strings > findstr.m

findstr

PURPOSE ^

% Return the vector of all positions in the longer of the two strings

SYNOPSIS ^

function v = findstr (s, t, overlap)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} findstr (@var{s}, @var{t}, @var{overlap})
% Return the vector of all positions in the longer of the two strings
% @var{s} and @var{t} where an occurrence of the shorter of the two starts.
% If the optional argument @var{overlap} is nonzero, the returned vector
% can include overlapping positions (this is the default).  For example,
%
% @example
% @group
% findstr ('ababab', 'a')
%      @result{} [1, 3, 5]
% findstr ('abababa', 'aba', 0)
%      @result{} [1, 5]
% @end group
% @end example
% @seealso{strfind, strmatch, 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