Kotlin Regex Split

May 18, 2019
val words = "This is great".split("\\s+".toRegex())

Result

["This", "is", "great"]
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.