MCPcopy Create free account
hub / github.com/OISF/libhtp / encode_utf8_4

Function encode_utf8_4

test/main.c:373–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373void encode_utf8_4(uint8_t *data, uint32_t i) {
374 i = i & 0x10ffff;
375 data[0] = 0xf0 + (i >> 18);
376 data[1] = 0x80 + ((i >> 12) & 0x3f);
377 data[2] = 0x80 + ((i >> 6) & 0x3f);
378 data[3] = 0x80 + (i & 0x3f);
379}
380
381int main_utf8_decoder_tests(int argc, char** argv) {
382 htp_cfg_t *cfg = htp_config_create();

Callers 1

main_utf8_decoder_testsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected