grapheme_next_line_break.3 (1136B)
1 .Dd 2022-08-26 2 .Dt GRAPHEME_NEXT_LINE_BREAK 3 3 .Os suckless.org 4 .Sh NAME 5 .Nm grapheme_next_line_break 6 .Nd determine codepoint-offset to next grapheme cluster break 7 .Sh SYNOPSIS 8 .In grapheme.h 9 .Ft size_t 10 .Fn grapheme_next_line_break "const uint_least32_t *str" "size_t len" 11 .Sh DESCRIPTION 12 The 13 .Fn grapheme_next_line_break 14 function computes the offset (in codepoints) to the next possible line 15 break (see 16 .Xr libgrapheme 7 ) 17 in the codepoint array 18 .Va str 19 of length 20 .Va len . 21 .Pp 22 If 23 .Va len 24 is set to 25 .Dv SIZE_MAX 26 (stdint.h is already included by grapheme.h) the string 27 .Va str 28 is interpreted to be NUL-terminated and processing stops when a 29 NUL-byte is encountered. 30 .Pp 31 For UTF-8-encoded input data 32 .Xr grapheme_next_line_break_utf8 3 33 can be used instead. 34 .Sh RETURN VALUES 35 The 36 .Fn grapheme_next_line_break 37 function returns the offset (in codepoints) to the next possible line 38 break in 39 .Va str 40 or 0 if 41 .Va str 42 is 43 .Dv NULL . 44 .Sh SEE ALSO 45 .Xr grapheme_next_line_break_utf8 3 , 46 .Xr libgrapheme 7 47 .Sh STANDARDS 48 .Fn grapheme_next_line_break 49 is compliant with the Unicode 14.0.0 specification. 50 .Sh AUTHORS 51 .An Laslo Hunhold Aq Mt dev@frign.de