libgrapheme

Freestanding C library for unicode string handling
git clone https://git.sinitax.com/suckless/libgrapheme
Log | Files | Refs | README | LICENSE | sfeed.txt

commit 031a47497bd4ef470bd48b8c9455ae4ce9d88121
parent faeaa564686873e4720a0c1ef9879f58347d754e
Author: Laslo Hunhold <dev@frign.de>
Date:   Sat, 18 Dec 2021 01:25:49 +0100

Refactor manual pages for lg_grapheme_*()

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

Diffstat:
Mman/lg_grapheme_isbreak.3 | 15++++++++-------
Mman/lg_grapheme_nextbreak.3 | 8+++++---
2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/man/lg_grapheme_isbreak.3 b/man/lg_grapheme_isbreak.3 @@ -1,4 +1,4 @@ -.Dd 2021-12-15 +.Dd 2021-12-18 .Dt LG_GRAPHEME_ISBREAK 3 .Os suckless.org .Sh NAME @@ -7,16 +7,16 @@ .Sh SYNOPSIS .In grapheme.h .Ft size_t -.Fn lg_grapheme_isbreak "uint_least32_t a, uint_least32_t b, LG_SEGMENTATION_STATE *state" +.Fn lg_grapheme_isbreak "uint_least32_t cp1" "uint_least32_t cp2" "LG_SEGMENTATION_STATE *state" .Sh DESCRIPTION The .Fn lg_grapheme_isbreak function determines if there is a grapheme cluster break (see .Xr libgrapheme 7 ) between the two code points -.Va a +.Va cp1 and -.Va b . +.Va cp2 . By specification this decision depends on a .Va state that can at most be completely reset after detecting a break and must @@ -29,13 +29,14 @@ is .Fn lg_grapheme_isbreak behaves as if it was called with a fully reset state. .Sh RETURN VALUES +The .Fn lg_grapheme_isbreak -returns +function returns .Va true if there is a grapheme cluster break between the code points -.Va a +.Va cp1 and -.Va b +.Va cp2 and .Va false if there is not. diff --git a/man/lg_grapheme_nextbreak.3 b/man/lg_grapheme_nextbreak.3 @@ -1,4 +1,4 @@ -.Dd 2021-12-15 +.Dd 2021-12-18 .Dt LG_GRAPHEME_NEXTBREAK 3 .Os suckless.org .Sh NAME @@ -9,8 +9,9 @@ .Ft size_t .Fn lg_grapheme_nextbreak "const char *str" .Sh DESCRIPTION +The .Fn lg_grapheme_nextbreak -computes the offset (in bytes) to the next grapheme +function computes the offset (in bytes) to the next grapheme cluster break (see .Xr libgrapheme 7 ) in the UTF-8-encoded NUL-terminated string @@ -23,8 +24,9 @@ For non-UTF-8 input data .Xr lg_grapheme_isbreak 3 can be used instead. .Sh RETURN VALUES +The .Fn lg_grapheme_nextbreak -returns the offset (in bytes) to the next grapheme cluster +function returns the offset (in bytes) to the next grapheme cluster break in .Va str or 0 if