Mirror of libs.suckless.org/libgrapheme. Used for adding meson support https://libs.suckless.org/libgrapheme/
  • C 92.8%
  • Makefile 5.8%
  • Meson 1.4%
2026-01-13 14:10:27 +01:00
benchmark add support for the meson build system 2026-01-13 01:08:20 +01:00
data Update Unicode data to version 17.0.0 2025-11-30 22:42:57 +01:00
gen build *-test headers only when test or benchmarks are enabled 2026-01-13 14:10:27 +01:00
gen2 Fully rework LUT generation 2025-10-14 22:05:20 +02:00
man Fix typo in man/libgrapheme.sh 2024-09-01 14:56:16 +02:00
src add support for the meson build system 2026-01-13 01:08:20 +01:00
test add support for the meson build system 2026-01-13 01:08:20 +01:00
.clang-format Add .clang-format file and make-rule 2022-11-15 15:40:26 +01:00
chdir_wrapper.py build *-test headers only when test or benchmarks are enabled 2026-01-13 14:10:27 +01:00
config.mk Don't warn about overlength strings in test data 2024-09-01 14:57:28 +02:00
configure Fix a small typo in configure 2023-02-24 18:26:22 +01:00
grapheme.h Refactor bidi and add reordering function 2023-05-26 09:51:44 +02:00
LICENSE Update license 2025-10-14 21:55:36 +02:00
Makefile Bump version to 3.0.0 2025-12-24 08:08:54 +01:00
meson.build build *-test headers only when test or benchmarks are enabled 2026-01-13 14:10:27 +01:00
meson_options.txt meson_options.txt: disable tests by default 2026-01-13 01:08:20 +01:00
README Update README 2025-12-24 08:05:10 +01:00

libgrapheme =========== libgrapheme is an extremely simple freestanding C99 library providing utilities for properly handling strings according to the latest Unicode standard 17.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 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). Requirements ------------ A C99-compiler and POSIX make. Installation ------------ Run ./configure, which automatically edits config.mk to match your local setup. Edit config.mk by hand if necessary or desired for further customization. Afterwards enter the following command to build and install libgrapheme (if necessary as root):	make install Conformance ----------- The libgrapheme library is compliant with the Unicode 15.0.0 specification (September 2022). The tests can be run with	make test to check standard conformance and correctness. Usage ----- Include the header grapheme.h in your code and link against libgrapheme with "-lgrapheme" either statically ("-static") or dynamically. Author ------ Laslo Hunhold <dev@frign.de>