libgrapheme

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

grapheme_next_sentence_break.3 (1235B)


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