W3cubDocs

/Kotlin

split

Platform and version requirements: JVM (1.0), JS (1.1)
fun split(input: CharSequence, limit: Int = 0): List<String>
Platform and version requirements: Native (1.3)
fun split(input: CharSequence, limit: Int): List<String>
For Common, JVM, JS

Splits the input CharSequence around matches of this regular expression.

Parameters

limit - Non-negative value specifying the maximum number of substrings the string can be split to. Zero by default means no limit is set.

For Native

Splits the input CharSequence around matches of this regular expression.

Parameters

limit - Non-negative value specifying the maximum number of substrings the string can be split to. Zero by default means no limit is set.

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/split.html