4 3448adb0 2022-11-02 op libgrapheme is an extremely simple freestanding C99 library providing
5 3448adb0 2022-11-02 op utilities for properly handling strings according to the latest Unicode
6 3448adb0 2022-11-02 op standard 15.0.0. It offers fully Unicode compliant
8 3448adb0 2022-11-02 op - grapheme cluster (i.e. user-perceived character) segmentation
9 3448adb0 2022-11-02 op - word segmentation
10 3448adb0 2022-11-02 op - sentence segmentation
11 3448adb0 2022-11-02 op - detection of permissible line break opportunities
12 3448adb0 2022-11-02 op - case detection (lower-, upper- and title-case)
13 3448adb0 2022-11-02 op - case conversion (to lower-, upper- and title-case)
15 3448adb0 2022-11-02 op on UTF-8 strings and codepoint arrays, which both can also be
16 3448adb0 2022-11-02 op null-terminated.
18 3448adb0 2022-11-02 op The necessary lookup-tables are automatically generated from the Unicode
19 3448adb0 2022-11-02 op standard data (contained in the tarball) and heavily compressed. Over
20 3448adb0 2022-11-02 op 10,000 automatically generated conformance tests and over 150 unit tests
21 3448adb0 2022-11-02 op ensure conformance and correctness.
23 3448adb0 2022-11-02 op There is no complicated build-system involved and it's all done using one
24 3448adb0 2022-11-02 op POSIX-compliant Makefile. All you need is a C99 compiler, given the
25 3448adb0 2022-11-02 op lookup-table-generators and compressors are also written in C99. The
26 3448adb0 2022-11-02 op resulting library is freestanding and thus not even dependent on a
27 3448adb0 2022-11-02 op standard library to be present at runtime, making it a suitable choice
28 3448adb0 2022-11-02 op for bare metal applications.
30 3448adb0 2022-11-02 op It is also way smaller and much faster than the other established
31 3448adb0 2022-11-02 op Unicode string libraries (ICU, GNU's libunistring, libutf8proc).
35 3448adb0 2022-11-02 op A C99-compiler and POSIX make.
39 3448adb0 2022-11-02 op Run ./configure, which automatically edits config.mk to match your local
40 3448adb0 2022-11-02 op setup. Edit config.mk by hand if necessary or desired for further
41 3448adb0 2022-11-02 op customization.
43 3448adb0 2022-11-02 op Afterwards enter the following command to build and install libgrapheme
44 3448adb0 2022-11-02 op (if necessary as root):
50 3448adb0 2022-11-02 op The libgrapheme library is compliant with the Unicode 15.0.0
51 3448adb0 2022-11-02 op specification (September 2022). The tests can be run with
55 3448adb0 2022-11-02 op to check standard conformance and correctness.
59 3448adb0 2022-11-02 op Include the header grapheme.h in your code and link against libgrapheme
60 3448adb0 2022-11-02 op with "-lgrapheme" either statically ("-static") or dynamically.
64 3448adb0 2022-11-02 op Laslo Hunhold <dev@frign.de>