MCPcopy Create free account
hub / github.com/HumbleUI/JWM / StringUTF16

Class StringUTF16

shared/cc/StringUTF16.hh:13–40  ·  view source on GitHub ↗

* @brief std::string which uses jchar as a character type */

Source from the content-addressed store, hash-verified

11 * @brief std::string which uses jchar as a character type
12 */
13 class StringUTF16: public std::basic_string<char16_t> {
14 public:
15 using std::basic_string<char16_t>::basic_string;
16
17 /**
18 * Constructs StringUTF16 from C style string.
19 * @arg str C style null terminated string in UTF8 encoding.
20 */
21 StringUTF16(const char* str);
22
23 /**
24 * Constructs StringUTF16 from C style string.
25 * @arg str C style null terminated string in UTF32 encoding.
26 */
27 explicit StringUTF16(const uint32_t* str);
28
29 StringUTF16() = default;
30
31 static StringUTF16 makeFromJString(JNIEnv* env, jstring js);
32
33 JNILocal<jstring> toJString(JNIEnv* env) const;
34
35 std::string toAscii() const;
36
37 bool operator==(const char* str) const {
38 return (*this) == StringUTF16(str);
39 }
40 };
41
42} // namespace jwm

Callers 3

operator==Method · 0.85
makeFromJStringMethod · 0.85
getFormatsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected