So I have this Java code:
String values = input.nextLine();
String[] longs = values.split(" ");
Which splits the string input into a string array.
I try it in Kotlin
var input: String? = readLine()
var ints: List<String>? = input.split(" ".toRegex())
and I get an error: "Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of the the type String?"
I am new to Kotlin and would like some clarity on how to do this. Thank you!