Driving me crazy!
I have the following simple snippet of code:
val text = "hello"
val splitStr = "l"
text.split(splitStr, false, 1)
But there is a compile error on the third line. It says:
None of the functions can be called with the arguments supplied.
Even though there is a split method in Strings.kt that takes these args:
public fun CharSequence.split(vararg delimiters: String, ignoreCase: Boolean = false, limit: Int = 0): List<String> =
rangesDelimitedBy(delimiters, ignoreCase = ignoreCase, limit = limit).asIterable().map { substring(it) }
Any ideas on what the problem is here? If I omit the last two arguments in compiles, but I should be able to pass them in as I am doing...