Mercurial > hg > octave-nkf
comparison scripts/strings/rindex.m @ 2355:c9f70d39255f
[project @ 1996-08-20 23:30:54 by jwe]
author | jwe |
---|---|
date | Tue, 20 Aug 1996 23:32:09 +0000 |
parents | b5568c31ee2c |
children | 4f40efa995c1 |
comparison
equal
deleted
inserted
replaced
2354:2ce6e1ec9b53 | 2355:c9f70d39255f |
---|---|
22 ## Returns the position of the last occurence of the string T in the | 22 ## Returns the position of the last occurence of the string T in the |
23 ## string S or 0 if no occurence is found. | 23 ## string S or 0 if no occurence is found. |
24 ## | 24 ## |
25 ## NOTE: this function does not work for arrays of strings. | 25 ## NOTE: this function does not work for arrays of strings. |
26 | 26 |
27 ## Author: jwe | 27 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> |
28 ## Adapted-By: jwe | |
28 | 29 |
29 function n = rindex (s, t) | 30 function n = rindex (s, t) |
30 | 31 |
31 ## This is patterned after the AWK function of the same name. | 32 ## This is patterned after the AWK function of the same name. |
32 | |
33 ## Original version by Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>. | |
34 | 33 |
35 if (nargin != 2) | 34 if (nargin != 2) |
36 usage ("rindex (s, t)"); | 35 usage ("rindex (s, t)"); |
37 endif | 36 endif |
38 | 37 |