MCPcopy Create free account
hub / github.com/JuliaStrings/utf8proc / seqindex_write_char_decomposed

Function seqindex_write_char_decomposed

utf8proc.c:380–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378}
379
380static utf8proc_ssize_t seqindex_write_char_decomposed(utf8proc_uint16_t seqindex, utf8proc_int32_t *dst, utf8proc_ssize_t bufsize, utf8proc_option_t options, int *last_boundclass) {
381 utf8proc_ssize_t written = 0;
382 const utf8proc_uint16_t *entry = &utf8proc_sequences[seqindex & 0x3FFF];
383 int len = seqindex >> 14;
384 if (len >= 3) {
385 len = *entry;
386 entry++;
387 }
388 for (; len >= 0; entry++, len--) {
389 utf8proc_int32_t entry_cp = seqindex_decode_entry(&entry);
390
391 written += utf8proc_decompose_char(entry_cp, dst ? dst+written : dst,
392 (bufsize > written) ? (bufsize - written) : 0, options,
393 last_boundclass);
394 if (written < 0) return UTF8PROC_ERROR_OVERFLOW;
395 }
396 return written;
397}
398
399UTF8PROC_DLLEXPORT utf8proc_int32_t utf8proc_tolower(utf8proc_int32_t c)
400{

Callers 1

utf8proc_decompose_charFunction · 0.85

Calls 2

seqindex_decode_entryFunction · 0.85
utf8proc_decompose_charFunction · 0.85

Tested by

no test coverage detected