Hi. How I can convert String into C-string? This c...
# kotlin-native
r
Hi. How I can convert String into C-string? This code
Copy code
import platform.posix.*
fun getPrecisionIni() = "precision".cstr
produce error on compile time
Copy code
example_num.kt:10:37: error: unresolved reference: cstr
fun getPrecisionIni() = "precision".cstr
g
Are you sure that you imported
kotlinx.cinterop.*
?
r
Thank you!