I need to split a String read in from a file into an array of values. I want to split the String at the commas, so for example, if the String read:
"name, 2012, 2017"
数组中的值为:
- array index 0 - name
- 数组索引1-2012
- array index 2 - 2017
我在Java中找到了这个例子:
String[] stringArray = string.split(",");
How I could do it in Kotlin?