diff --git a/libraries/stdlib/src/kotlin/text/StringsJVM.kt b/libraries/stdlib/src/kotlin/text/StringsJVM.kt index c2237f76778..270f9da5f2b 100644 --- a/libraries/stdlib/src/kotlin/text/StringsJVM.kt +++ b/libraries/stdlib/src/kotlin/text/StringsJVM.kt @@ -130,9 +130,14 @@ public fun String.split(regex: Pattern, limit: Int = 0): List /** * Splits this string around matches of the given regular expression. */ -deprecated("Convert an argument to regex with toRegex or use splitBy instead.") -public fun String.split(regex: String): Array = split(regex.toRegex()).toTypedArray() +deprecated("Convert String argument to regex with toRegex or use splitBy instead.") +public fun String.split(regex: String): Array = (this as java.lang.String).split(regex) +/** + * Splits this string into at most [limit] chunks around matches of the given regular expression. + */ +deprecated("Convert String argument to regex with toRegex or use splitBy instead.") +public fun String.split(regex: String, limit: Int): Array = (this as java.lang.String).split(regex, limit) /** * Returns a substring of this string starting with the specified index.