from
M-File Alignment
by Andre Strobel
Functions for cleaning m-code alignment
|
| fFindStr(vString, vLookFor)
|
function vPositions = fFindStr(vString, vLookFor)
%fFindStr find string vLookFor in string vString
%
% vPositions = fFindStr(vString, vLookFor)
%
% Function for finding string vLookFor in string vString.
%
% Example: vPositions = fFindStr('look in this string', 'this');
%
% Author: Dipl.-Ing. Andr Manfred Strobel
% Copyright: 1999-2001 by DaimlerChrysler AG, FT1/AK
% Matlab: 6.0, R12 (Win)
% Date: 2001/01/17 11:00
% Version: 001.00 * Released * / beta / alpha
% Release: 01.00
if (length(vString) >= length(vLookFor))
% first string is longer
vPositions = findstr(vString, vLookFor); % use Matlab command
else
% second string is longer
vPositions = []; % second string can't be in first string
end % of if
|
|
Contact us at files@mathworks.com