blob: 8da0ce4931b92cec97c368eb36e6f219f87a29a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include <mbgl/text/unaccent.hpp>
#include <string>
#include "attach_env.hpp"
#include "text/collator_jni.hpp"
#include <jni/jni.hpp>
namespace mbgl {
namespace platform {
std::string unaccent(const std::string& str) {
android::UniqueEnv env = android::AttachEnv();
jni::Local<jni::String> input = jni::Make<jni::String>(*env, str);
jni::Local<jni::String> unaccented = android::StringUtils::unaccent(*env, input);
return jni::Make<std::string>(*env, unaccented);
}
} // namespace platform
} // namespace mbgl
|