I can't seem to find a good built-in way to convert an NSString to wchar_t... any tips on how to do this? Anything Apple exposes on the NSString class is for c-strings (char*) or for unichars, but nothing for wchar*.
[urString cStringUsingEncoding:NSUTF16LittleEndianStringEncoding]
wchar_t
is compiler specific. Assuming you wan the Win32 wchar_t
, then UTF16 little ending encoded will do it. For Unix wchar_t
you may need the NSUTF32 encoding family, with your platform of choice endianess.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With