How do I convert jstring to wchar_t *

Posted by Obediah Stane on Stack Overflow See other posts from Stack Overflow or by Obediah Stane
Published on 2008-09-15T23:51:29Z Indexed on 2010/06/07 20:52 UTC
Read the original article Hit count: 205

Filed under:
|
|

Let's say that on the C++ side my function takes a variable of type jstring named myString. I can convert it to an ANSI string as follows:

const char* ansiString = env->GetStringUTFChars(myString, 0);

is there a way of getting

const wchar_t* unicodeString = ...

© Stack Overflow or respective owner

Related posts about java

Related posts about c++