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

Function main

test/maxdecomposition.c:6–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4 in order to give a hint in the documentation. The hint will need to be updated if this changes. */
5
6int main(void)
7{
8 utf8proc_int32_t dst[128];
9 utf8proc_ssize_t maxsize = 0, expected_maxsize = 4;
10 int success;
11
12 for (utf8proc_int32_t c = 0; c <= 0x110000; ++c) {
13 utf8proc_ssize_t sz = utf8proc_decompose_char(c, dst, 128, UTF8PROC_DECOMPOSE, NULL);
14 maxsize = sz > maxsize ? sz : maxsize;
15 }
16
17 success = expected_maxsize == maxsize;
18 fprintf(success ? stdout : stderr,
19 "%s: maximum decomposed size = %d chars\n",
20 success ? "SUCCEEDED" : "FAILED", (int) maxsize);
21 return !success;
22}

Callers

nothing calls this directly

Calls 1

utf8proc_decompose_charFunction · 0.85

Tested by

no test coverage detected