indexOf*, split, startsWith, endsWith: JS implementation

This commit is contained in:
Ilya Gorbunov
2015-03-26 17:57:27 +03:00
committed by Ilya Gorbunov
parent d724ce3f7e
commit b10d869cd7
4 changed files with 48 additions and 31 deletions
-13
View File
@@ -17,19 +17,6 @@
(function (Kotlin) {
"use strict";
// Shims for String
String.prototype.startsWith = function (s) {
return this.indexOf(s) === 0;
};
String.prototype.endsWith = function (s) {
return this.indexOf(s, this.length - s.length) !== -1;
};
String.prototype.contains = function (s) {
return this.indexOf(s) !== -1;
};
// Kotlin stdlib
Kotlin.equals = function (obj1, obj2) {