Fix split method usage in JS: split replaced with splitWithRegex or splitBy.

This commit is contained in:
Ilya Gorbunov
2015-03-31 16:09:11 +03:00
parent 95c2a4fb29
commit b930f71b79
2 changed files with 3 additions and 3 deletions
@@ -12,7 +12,7 @@ fun box(): String {
for (test in tests) {
val regexp = test.first
val expected = test.second
val result = testInput.split(regexp)
val result = testInput.splitWithRegex(regexp)
if (result != expected) return "Wrong result for '$regexp' -- Expected: $expected | Actual: $result"
}
@@ -21,7 +21,7 @@ fun box(): String {
val regexp = test.first
val limit = 2
val expected = Array(limit) { test.second[it] }
val result = testInput.split(regexp, limit)
val result = testInput.splitWithRegex(regexp, limit)
if (result != expected) return "Wrong result for '$regexp' -- Expected: $expected | Actual: $result"
}