blob: c4fd97a2562cc94e8d59e0d8e965f1b23cb7e57a [file] [log] [blame]
Lukas Zilkab23e2122018-02-09 10:25:19 +01001/*
Tony Mak6c4cc672018-09-17 11:48:50 +01002 * Copyright (C) 2018 The Android Open Source Project
Lukas Zilkab23e2122018-02-09 10:25:19 +01003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Tony Mak6c4cc672018-09-17 11:48:50 +010017#ifndef LIBTEXTCLASSIFIER_UTILS_JAVA_STRING_UTILS_H_
18#define LIBTEXTCLASSIFIER_UTILS_JAVA_STRING_UTILS_H_
Lukas Zilkab23e2122018-02-09 10:25:19 +010019
20#include <jni.h>
21#include <string>
22
Tony Mak6c4cc672018-09-17 11:48:50 +010023namespace libtextclassifier3 {
Lukas Zilkab23e2122018-02-09 10:25:19 +010024
25bool JStringToUtf8String(JNIEnv* env, const jstring& jstr, std::string* result);
26
Tony Mak6c4cc672018-09-17 11:48:50 +010027} // namespace libtextclassifier3
Lukas Zilkab23e2122018-02-09 10:25:19 +010028
Tony Mak6c4cc672018-09-17 11:48:50 +010029#endif // LIBTEXTCLASSIFIER_UTILS_JAVA_STRING_UTILS_H_