checking in code
authorbdemsky <bdemsky>
Wed, 1 Nov 2006 06:25:35 +0000 (06:25 +0000)
committerbdemsky <bdemsky>
Wed, 1 Nov 2006 06:25:35 +0000 (06:25 +0000)
Robust/src/ClassLibrary/String.java

index 065f7c8c67c5285ecddf9158b23dece2cdcbf4f1..faabe029e7f409348b64140635a6923ff19b017a 100644 (file)
@@ -77,6 +77,10 @@ public class String {
        return -1;
     }
 
+    public boolean startsWith(String str) {
+       return regionMatches(0, str, 0, str.count);
+    }
+
     public boolean regionMatches(int toffset, String other, int ooffset, int len) {
        if (toffset<0 || ooffset <0 || (toffset+len)>count || (ooffset+len)>other.count)
            return false;