Index: src/string.js |
diff --git a/src/string.js b/src/string.js |
index 1bbc8a69ce1259515bb950d2b259c5269056435a..1db65bb0bad25b677c7fa38144976c6a39f4ca18 100644 |
--- a/src/string.js |
+++ b/src/string.js |
@@ -997,7 +997,7 @@ function StringStartsWith(searchString /* position */) { // length == 1 |
return false; |
} |
- return %StringIndexOf(s, ss, start) === start; |
+ return %_SubString(s, start, start + ss_len) === ss; |
} |
@@ -1028,7 +1028,7 @@ function StringEndsWith(searchString /* position */) { // length == 1 |
return false; |
} |
- return %StringLastIndexOf(s, ss, start) === start; |
+ return %_SubString(s, start, start + ss_len) === ss; |
} |