diff scripts/strings/rindex.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 8389e78e67d4
line wrap: on
line diff
--- a/scripts/strings/rindex.m	Thu Jan 13 08:32:16 2000 +0000
+++ b/scripts/strings/rindex.m	Thu Jan 13 08:40:53 2000 +0000
@@ -21,12 +21,12 @@
 ## @deftypefn {Function File} {} rindex (@var{s}, @var{t})
 ## Return the position of the last occurrence of the string @var{t} in the
 ## string @var{s}, or 0 if no occurrence is found.  For example,
-## 
+##
 ## @example
 ## rindex ("Teststring", "t")
 ##      @result{} 6
 ## @end example
-## 
+##
 ## @strong{Note:}  This function does not work for arrays of strings.
 ## @end deftypefn
 
@@ -51,10 +51,10 @@
     if (l_t <= l_s)
       tmp = l_s - l_t + 1;
       for idx = tmp : -1 : 1
-	if (strcmp (substr (s, idx, l_t), t))
-	  n = idx;
-	  return;
-	endif
+        if (strcmp (substr (s, idx, l_t), t))
+          n = idx;
+          return;
+        endif
       endfor
     endif