MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / getUtf8LenArray

Function getUtf8LenArray

src/String.cpp:148–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146static unsigned char *sUtf8LenArray = 0;
147
148static const unsigned char *getUtf8LenArray()
149{
150 if (!sUtf8LenArray)
151 {
152 sUtf8LenArray = (unsigned char *)malloc(256);
153 for(int i=0;i<256;i++)
154 sUtf8LenArray[i] = i< 0x80 ? 1 : i<0xe0 ? 2 : i<0xf0 ? 3 : 4;
155 }
156 return sUtf8LenArray;
157}
158
159static inline int DecodeAdvanceUTF8(const unsigned char * &ioPtr)
160{

Callers 4

_hx_utf8_char_code_atFunction · 0.85
_hx_utf8_lengthFunction · 0.85
_hx_utf8_is_validFunction · 0.85
_hx_utf8_subFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected