Created
November 9, 2015 11:08
-
-
Save 0xF6/833ba3c0b7cd7de416b2 to your computer and use it in GitHub Desktop.
JNI String to const char*
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const char* toConstChar(JNIEnv* pEnv, jstring jStr) | |
{ | |
const char* nativeString = pEnv->GetStringUTFChars(jStr, JNI_FALSE); | |
pEnv->ReleaseStringUTFChars(jStr, nativeString); | |
return nativeString; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment