Mercurial > hg > octave-lyh
diff scripts/strings/findstr.m @ 3426:f8dde1807dee
[project @ 2000-01-13 08:40:00 by jwe]
author | jwe |
---|---|
date | Thu, 13 Jan 2000 08:40:53 +0000 |
parents | 4f40efa995c1 |
children | 434790acb067 |
line wrap: on
line diff
--- a/scripts/strings/findstr.m +++ b/scripts/strings/findstr.m @@ -23,7 +23,7 @@ ## @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 ## findstr ("ababab", "a") ## @result{} [ 1, 3, 5 ] @@ -68,10 +68,10 @@ k = 1; while (k <= limit) if (s (ind + k - 1) == t) - v (++i) = k; - if (! overlap) - k = k + l_t - 1; - endif + v (++i) = k; + if (! overlap) + k = k + l_t - 1; + endif endif k++; endwhile