Hi everyone. In my android project, I set up minim...
# android
l
Hi everyone. In my android project, I set up minimal API to 21. But I can't use kotlin function String#chars() in order to transform a String to an array of chars. So I wonder if I can find the implementation of the extension function somewhere or if there is a simple way to do it ?
e
there is no extension on
kotlin.String
named
.chars()
. perhaps you are thinking of the member function of the Java type, https://developer.android.com/reference/java/lang/String#chars() which was added in API 24 (as part of updates to Java 9 support)
or perhaps you are thinking of
.toCharArray()
, which is a Kotlin extension function which should be in the default imported namespaces https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/to-char-array.html
👍🏾 1
l
Yes, thank you very much 🙂 I was looking for
toCharArray()