Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BASE_ANDROID_JNI_STRING_H_ | |
| 6 #define BASE_ANDROID_JNI_STRING_H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/string16.h" | |
| 12 | |
| 13 namespace base { | |
| 14 namespace android { | |
| 15 | |
| 16 // Convert a Java string to UTF8. Returns a std string. | |
|
M-A Ruel
2011/11/11 13:09:07
Verb tense usage is inconsistent in every files.
| |
| 17 std::string ConvertJavaStringToUTF8(JNIEnv* env, jstring str); | |
| 18 | |
| 19 // Convert a std string to Java string. | |
| 20 jstring ConvertUTF8ToJavaString(JNIEnv* env, const std::string& str); | |
| 21 | |
| 22 // Convert a Java string to UTF16. Returns a string16. | |
| 23 string16 ConvertJavaStringToUTF16(JNIEnv* env, jstring str); | |
| 24 | |
| 25 // Convert a string16 to a Java string. | |
| 26 jstring ConvertUTF16ToJavaString(JNIEnv* env, const string16& str); | |
| 27 | |
| 28 } // namespace android | |
| 29 } // namespace base | |
| 30 | |
| 31 #endif // BASE_ANDROID_JNI_STRING_H_ | |
| OLD | NEW |