changeset 118:ff7053751d15

Added Phobos implementation of java.lang.String.indexOf and lastIndexOf.
author Jacob Carlborg <doob@me.com>
date Sun, 17 Apr 2011 17:57:11 +0200
parents c81e3dc6b9ad
children d00e8db0a568
files base/src/java/lang/String.d
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/base/src/java/lang/String.d	Sun Apr 17 17:47:05 2011 +0200
+++ b/base/src/java/lang/String.d	Sun Apr 17 17:57:11 2011 +0200
@@ -545,8 +545,7 @@
         if( res is str.length ) res = -1;
         return res;
     } else { // Phobos
-        implMissing( __FILE__, __LINE__ );
-        return 0;
+        return std.string.indexOf(str[start .. $], ch);
     }
 }
 
@@ -562,8 +561,7 @@
         if( res is str.length ) res = -1;
         return res;
     } else { // Phobos
-        implMissing( __FILE__, __LINE__ );
-        return 0;
+        return std.string.lastIndexOf(str[0 .. fromIndex], ch);
     }
 }