56 lines
1.2 KiB
Groff
56 lines
1.2 KiB
Groff
.Dd 2022-10-06
|
|
.Dt GRAPHEME_NEXT_WORD_BREAK 3
|
|
.Os suckless.org
|
|
.Sh NAME
|
|
.Nm grapheme_next_word_break
|
|
.Nd determine codepoint-offset to next word break
|
|
.Sh SYNOPSIS
|
|
.In grapheme.h
|
|
.Ft size_t
|
|
.Fn grapheme_next_word_break "const uint_least32_t *str" "size_t len"
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Fn grapheme_next_word_break
|
|
function computes the offset (in codepoints) to the next word
|
|
break (see
|
|
.Xr libgrapheme 7 )
|
|
in the codepoint array
|
|
.Va str
|
|
of length
|
|
.Va len .
|
|
If a word begins at
|
|
.Va str
|
|
this offset is equal to the length of said word.
|
|
.Pp
|
|
If
|
|
.Va len
|
|
is set to
|
|
.Dv SIZE_MAX
|
|
(stdint.h is already included by grapheme.h) the string
|
|
.Va str
|
|
is interpreted to be NUL-terminated and processing stops when
|
|
a codepoint with the value 0 is encountered.
|
|
.Pp
|
|
For UTF-8-encoded input
|
|
data
|
|
.Xr grapheme_next_word_break_utf8 3
|
|
can be used instead.
|
|
.Sh RETURN VALUES
|
|
The
|
|
.Fn grapheme_next_word_break
|
|
function returns the offset (in codepoints) to the next word
|
|
break in
|
|
.Va str
|
|
or 0 if
|
|
.Va str
|
|
is
|
|
.Dv NULL .
|
|
.Sh SEE ALSO
|
|
.Xr grapheme_next_word_break_utf8 3 ,
|
|
.Xr libgrapheme 7
|
|
.Sh STANDARDS
|
|
.Fn grapheme_next_word_break
|
|
is compliant with the Unicode 15.0.0 specification.
|
|
.Sh AUTHORS
|
|
.An Laslo Hunhold Aq Mt dev@frign.de
|