MCPcopy Create free account
hub / github.com/antvis/F2Native / StringToJavaString

Function StringToJavaString

core/android/JNIUtil.cpp:167–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167ScopedJavaLocalRef<jstring> StringToJavaString(JNIEnv *env, const std::string &data) {
168 if(data.empty()) { // 空数据guard
169 auto result = ScopedJavaLocalRef<jstring>(env, env->NewStringUTF(""));
170 ASSERT_NO_EXCEPTION();
171 return result;
172 } else {
173 auto result = ScopedJavaLocalRef<jstring>(env, env->NewStringUTF(data.data()));
174 ASSERT_NO_EXCEPTION();
175 return result;
176 }
177}
178
179std::map<int, int> JavaMapIntIntToMap(JNIEnv *env, jobject hashMap) {
180 std::map<int, int> resultMap;

Callers 15

PlayAnimationMethod · 0.85
GetTimezoneOffsetMethod · 0.85
FormatTimeMethod · 0.85
OnLoadMethod · 0.85
InnerLogFunction · 0.85
SetLineCapMethod · 0.85
SetLineJoinMethod · 0.85
SetFontMethod · 0.85
FillTextMethod · 0.85
StrokeTextMethod · 0.85
SetTextAlignMethod · 0.85
SetTextBaselineMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected