Assume:
char from[10]="abcd";
wchar_t to[10]=L"";
In gcc under Linux and MSVC, I can use: sscanf(from, "%S", to);
to get a wchar_t
string L"abcd"
in to
. But this does not work in NDK.
I want to know whether this is supported in NDK? Is there any alternatives?
I know I can use a copy loop to accomplish this:
for (int i = 0; i <= strlen(from); ++i)
to[i] = from[i];
I'm using android-ndk-r7-crystax-5.beta2-linux-x86.tar.bz2 . My string contains only ASCII characters, so I'm don't want use iconv
.