MCPcopy Create free account
hub / github.com/Snapchat/Valdi / utf16Encode

Function utf16Encode

valdi_core/src/valdi_core/cpp/Text/UTF16Utils.cpp:151–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149 // Codepoint out of range
150 return kInvalidPt;
151 }
152}
153
154static inline char32_t utf8Decode(const char* str, std::string::size_type& i, std::string::size_type len) {
155 OffsetPt res = utf8DecodeCheck(str, i, len);
156 if (res.offset < 0) {
157 i += 1;
158 return 0xFFFD;
159 } else {
160 i += res.offset;
161 return res.pt;
162 }
163}

Callers 1

utf8ToUtf16Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected