Would I be able to somehow get wchar_tVar as a Byt...
# kotlin-native
a
Would I be able to somehow get wchar_tVar as a ByteVar and then get it as a KString?
Wait, according to this one error I got, it says that wchar_tVar is UShortVarOf<wchar /* = UShort */> so if I can get the wchar_tVar as the value of UShortVarOf and then get the KString that'd be good. Lemme try that
m
If it's really
CPointer<wchar_tVar>
then just
.toKString()
should work.
a
Oh I had tried that but the result I got was weird except I just realized why the result was weird. Thanks tho.
u
Mind letting us know?
a
All I get printed out is a box with a ?. I'm in a command prompt session. Isn't wchar 16 bits? So I should be able to do toKStringFromUtf16
Right?
But when I do that I get told it's unresolved.
s
toKStringFromUtf16
will be available in 1.3.30. Use
toKString
.
a
Ah okay. Well, I'm still struggling to print out a string cause it's just a box with a question mark
Nevermind. I realize what my problem was. The string was null and I was needing to iterate through an enumeration but I was iterating wrong. Once I fixed the iteration problem I was able to print everything correctly.
👍 1