extremely simple freestanding C99 library providing utilities for properly handling strings according to the latest Unicode standard
libgrapheme is an extremely simple freestanding C99 library providing utilities for properly handling strings according to the latest Unicode standard 15.0.0. It offers fully Unicode compliant grapheme cluster (i.e. user-perceived character) segmentation, word segmentation, sentence segmentation, detection of permissible line break opportunities, case detection (lower-, upper- and title-case), case conversion (to lower-, upper- and title-case) on UTF-8 strings and codepoint arrays, which both can also be null-terminated. The necessary lookup-tables are automatically generated from the Unicode standard data (contained in the tarball) and heavily compressed. Over 10,000 automatically generated conformance tests and over 150 unit tests ensure conformance and correctness. There is no complicated build-system involved and it's all done using one POSIX-compliant Makefile. All you need is a C99 compiler, given the lookup-table-generators and compressors that are only run at build-time are also written in C99. The resulting library is freestanding and thus not even dependent on a standard library to be present at runtime, making it a suitable choice for bare metal applications. It is also way smaller and much faster than the other established Unicode string libraries (ICU, GNU's libunistring, libutf8proc).
libgrapheme is an extremely simple freestanding C99 library providing utilities for properly handling strings according to the latest Unicode standard 15.0.0. It offers fully Unicode compliant grapheme cluster (i.e. user-perceived character) segmentation, word segmentation, sentence segmentation, detection of permissible line break opportunities, case detection (lower-, upper- and title-case), case conversion (to lower-, upper- and title-case) on UTF-8 strings and codepoint arrays, which both can also be null-terminated. The necessary lookup-tables are automatically generated from the Unicode standard data (contained in the tarball) and heavily compressed. Over 10,000 automatically generated conformance tests and over 150 unit tests ensure conformance and correctness. There is no complicated build-system involved and it's all done using one POSIX-compliant Makefile. All you need is a C99 compiler, given the lookup-table-generators and compressors that are only run at build-time are also written in C99. The resulting library is freestanding and thus not even dependent on a standard library to be present at runtime, making it a suitable choice for bare metal applications. It is also way smaller and much faster than the other established Unicode string libraries (ICU, GNU's libunistring, libutf8proc).
To install libgrapheme, run the following command in macOS terminal (Applications->Utilities->Terminal)
sudo port install libgrapheme
To see what files were installed by libgrapheme, run:
port contents libgrapheme
To later upgrade libgrapheme, run:
sudo port selfupdate && sudo port upgrade libgrapheme
Reporting an issue on MacPorts Trac
The MacPorts Project uses a system called Trac to file tickets to report bugs and enhancement requests.
Though anyone may search Trac for tickets, you must have a GitHub account in order to login to Trac to create tickets.