Hey guys so I'm working on a project(personal) and I'm new to kotlin native I understand that it can Interop with C and when I'm using getenv and printing it to console it's stating CPointer then giving me the address of the pointer how to I have that returned as a String for example. I know that CPointer s are not nullable unless using null safes. What should I do
m
Matej Kormuth
11/05/2018, 3:36 PM
.toKString()
o
olonho
11/05/2018, 4:02 PM
Copy code
import platform.posix.*
import kotlinx.cinterop.*
fun main() = println(getenv("HOME")!!.toKString())