2nd stage of split semantics change: remove deprecated String.split(String), rename splitBy back to split. Provide replacement for splitBy and splitWithRegex (JS).

This commit is contained in:
Ilya Gorbunov
2015-06-24 18:55:23 +03:00
parent 9caf5baf34
commit 249106647c
4 changed files with 13 additions and 29 deletions
+2 -11
View File
@@ -18,23 +18,14 @@ internal fun String.nativeStartsWith(s: String, position: Int): Boolean = noImpl
native("endsWith")
internal fun String.nativeEndsWith(s: String): Boolean = noImpl
deprecated("Use split(Regex) instead.")
deprecated("Use split(Regex) instead.", ReplaceWith("split(regex.toRegex()).toTypedArray()"))
library("splitString")
public fun String.splitWithRegex(regex: String): Array<String> = noImpl
deprecated("Use split(Regex) instead.")
deprecated("Use split(Regex) instead.", ReplaceWith("split(regex.toRegex(), limit = limit).toTypedArray()"))
library("splitString")
public fun String.splitWithRegex(regex: String, limit: Int): Array<String> = noImpl
deprecated("Use split(Regex) instead.")
library("splitString")
public fun String.split(regex: String): Array<String> = noImpl
deprecated("Use split(Regex) instead.")
library("splitString")
public fun String.split(regex: String, limit: Int): Array<String> = noImpl
native public fun String.substring(beginIndex : Int) : String = noImpl
native public fun String.substring(beginIndex : Int, endIndex : Int) : String = noImpl