MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / utf8_encode_append

Function utf8_encode_append

StereoKitC/libraries/unicode.cpp:141–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139///////////////////////////////////////////
140
141int32_t utf8_encode_append(char *buffer, size_t size, char32_t ch) {
142 int32_t count = utf8_encode_units(ch);
143 size_t len = strlen(buffer);
144 if (len + count + 1 >= size) {
145 return 0;
146 } else {
147 count = utf8_encode(&buffer[len], ch);
148 buffer[len + count] = '\0';
149 return count;
150 }
151}
152
153///////////////////////////////////////////
154

Callers 1

utf_encode_appendFunction · 0.85

Calls 3

utf8_encode_unitsFunction · 0.85
strlenFunction · 0.85
utf8_encodeFunction · 0.85

Tested by

no test coverage detected