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

Function String_EncodeUtf8

src/String.c:653–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

651}
652
653int String_EncodeUtf8(void* data, const cc_string* src) {
654 cc_uint8* dst = (cc_uint8*)data;
655 cc_uint8* cur;
656 int i, len = 0;
657 if (src->length > FILENAME_SIZE) Process_Abort("String too long to expand");
658
659 for (i = 0; i < src->length; i++) {
660 cur = dst + len;
661 len += Convert_CP437ToUtf8(src->buffer[i], cur);
662 }
663 dst[len] = '\0';
664 return len;
665}
666
667
668/*########################################################################################################################*

Callers 15

SSL_InitFunction · 0.85
Platform_EncodePathFunction · 0.85
Directory_EnumFunction · 0.85
Process_StartGame2Function · 0.85
Process_StartOpenFunction · 0.85
Platform_EncodePathFunction · 0.85
Window_SetTitleFunction · 0.85
HandleSelectionRequestFunction · 0.85
Socket_ParseAddressFunction · 0.85
SysFont_TextWidthFunction · 0.85
SysFont_DrawTextFunction · 0.85
Process_StartOpenFunction · 0.85

Calls 1

Convert_CP437ToUtf8Function · 0.85

Tested by

no test coverage detected