How do I create and use an internal function in an ndk c++ file?
jstring Java_com_test_ndk_MainActivity_getString(JNIEnv* env, jobject thiz)
{
jstring strt = getstr();
return env->NewStringUTF(strt);
}
I want to implement the getstr()
function in c++ for just use in ndk side and not java...
Also, how do I get the length of a jstring and implement substring in c++? Does a function exist or must I write my own?