Is there a straightforward way to convert `CArrayP...
# kotlin-native
n
Is there a straightforward way to convert
CArrayPointer<UByteVar>
to a String?
d
This is the best I've got,
it.reinterpret<ByteVar>().toKString()
.
b
Be sure your string is null-terminated in that case
n
Would be great if the toKString ext function covered the
CArrayPointer<UByteVar>
and
CArrayPointer<ByteVar>
data types. Having
toKString
available would help save a bit of time.
Are there functions available for handling the UTF-16LE String encoding? Currently using the ASCII version of a C function ( http://libusb.sourceforge.net/api-1.0/group__desc.html#gaf3f92d0a7465d49a5e61eb3f8689fae4 ) from the libusb library. The library has a UTF-16LE version of the C function that is being used ( http://libusb.sourceforge.net/api-1.0/group__desc.html#gab89c2119087308c6bfa6a4be30f39bc3 ).