MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / String_AppendUtf8

Function String_AppendUtf8

src/String.c:630–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628}
629
630void String_AppendUtf8(cc_string* value, const void* data, int numBytes) {
631 const cc_uint8* chars = (const cc_uint8*)data;
632 int len; cc_codepoint cp; char c;
633
634 for (; numBytes > 0; numBytes -= len)
635 {
636 len = Convert_Utf8ToCodepoint(&cp, chars, numBytes);
637 if (!len) return;
638
639 if (Convert_TryCodepointToCP437(cp, &c)) String_Append(value, c);
640 chars += len;
641 }
642}
643
644void String_AppendCP1252(cc_string* value, const void* data, int numBytes) {
645 const cc_uint8* chars = (const cc_uint8*)data;

Callers 15

Platform_DecodePathFunction · 0.85
Directory_EnumFunction · 0.85
Platform_DescribeErrorFunction · 0.85
Platform_DecodePathFunction · 0.85
Directory_EnumFunction · 0.85
Platform_DescribeErrorFunction · 0.85
HandleSelectionNotifyFunction · 0.85
OpenSaveFileDialogFunction · 0.85
Nbt_ReadStringFunction · 0.85
Clipboard_GetTextFunction · 0.85
Clipboard_GetTextFunction · 0.85
CallOpenFileCallbackFunction · 0.85

Calls 3

Convert_Utf8ToCodepointFunction · 0.85
String_AppendFunction · 0.85

Tested by

no test coverage detected