v1.8.10
  • Solutions
    • Multiplatform Mobile
    • Multiplatform for other platforms
    • Server-side
    • Web frontend
    • Data science
    • Android
  • Docs
  • Community
  • Teach
  • Play
    • Playground
    • Hands-on
    • Examples
    • Koans
← Docs
kotlin-stdlib / kotlin.text / Regex / split

split

Common
JVM
JS
1.0
fun split(input: CharSequence, limit: Int = 0): List<String>
(Common source) (JVM source) (JS source)

Splits the input CharSequence to a list of strings 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.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Kotlin™ is protected under the Kotlin Foundation and licensed under the Apache 2 license.
Supported and developed by JetBrains