Contact: aviboots(AT)netvision.net.il
40,955 questions
53,419 answers
573 users
fun main() { val str = "kotlin c c++ java python rust" val words = str.split("\\s+".toRegex()) val count = words.count() println("Number of words: $count") } /* run: Number of words: 6 */