libgrapheme

unicode string library
git clone git://git.suckless.org/libgrapheme
Log | Files | Refs | README | LICENSE

commit c7021f101ce95bff58157fb32c50d204cf8569b2
parent fd8f4f4e496ba83bba253b52787ccde39384f99a
Author: Laslo Hunhold <dev@frign.de>
Date:   Wed, 22 Dec 2021 13:46:07 +0100

Add README and change title and introduction in Makefile and manuals

Signed-off-by: Laslo Hunhold <dev@frign.de>

Diffstat:
MMakefile | 2+-
AREADME | 38++++++++++++++++++++++++++++++++++++++
Mman/libgrapheme.7 | 17+++++++++++++----
3 files changed, 52 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,5 +1,5 @@ # See LICENSE file for copyright and license details -# libgrapheme - grapheme cluster utility library +# libgrapheme - unicode string library .POSIX: include config.mk diff --git a/README b/README @@ -0,0 +1,38 @@ +libgrapheme +=========== + +The libgrapheme library provides functions to properly handle Unicode +strings according to the Unicode specification. Unicode strings are made +up of user-perceived characters (so-called "grapheme clusters") that are +made up of one or more Unicode codepoints, which in turn are encoded in +one or more bytes in an encoding like UTF-8. + +Despite the complicated multilevel structure of Unicode strings, +libgrapheme provides methods to work with them at the byte-level (i.e. +UTF-8 ‘char’ arrays) while also providing codepoint-level methods. + +See libgrapheme(7) to get started and try out the self-contained examples +given on the manual pages for each function. + +Requirements +------------ +A C99-compiler and POSIX make. + +Installation +------------ +Edit config.mk to match your local setup (usually not necessary, the +default prefix is /usr/local). + +Afterwards enter the following command to build and install libgrapheme +(if necessary as root): + + make install + +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> diff --git a/man/libgrapheme.7 b/man/libgrapheme.7 @@ -3,17 +3,26 @@ .Os suckless.org .Sh NAME .Nm libgrapheme -.Nd unicode library +.Nd unicode string library .Sh SYNOPSIS .In grapheme.h .Sh DESCRIPTION The .Nm -library provides functions to properly handle user-perceived characters -.Dq ( grapheme clusters , +library provides functions to properly handle Unicode strings according +to the Unicode specification. +Unicode strings are made up of user-perceived characters (so-called +.Dq grapheme clusters , see .Sx MOTIVATION ) -according to the Unicode specification. +that are made up of one or more Unicode codepoints, which in turn +are encoded in one or more bytes in an encoding like UTF-8. +.Pp +Despite this complicated multilevel structure of Unicode strings, +.Nm +provides methods to work with them at the byte-level (i.e. UTF-8 +.Sq char +arrays) while also offering codepoint-level methods. .Sh SEE ALSO .Xr grapheme_decode_utf8 3 , .Xr grapheme_encode_utf8 3 ,