57 lines
1.2 KiB
Groff
57 lines
1.2 KiB
Groff
.Dd 2022-10-06
|
|
.Dt GRAPHEME_TO_LOWERCASE_UTF8 3
|
|
.Os suckless.org
|
|
.Sh NAME
|
|
.Nm grapheme_to_lowercase_utf8
|
|
.Nd convert UTF-8-encoded string to lowercase
|
|
.Sh SYNOPSIS
|
|
.In grapheme.h
|
|
.Ft size_t
|
|
.Fn grapheme_to_lowercase_utf8 "const char *src" "size_t srclen" "char *dest" "size_t destlen"
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Fn grapheme_to_lowercase_utf8
|
|
function converts the UTF-8-encoded string
|
|
.Va str
|
|
to lowercase and writes the result to
|
|
.Va dest
|
|
up to
|
|
.Va destlen ,
|
|
unless
|
|
.Va dest
|
|
is set to
|
|
.Dv NULL .
|
|
.Pp
|
|
If
|
|
.Va srclen
|
|
is set to
|
|
.Dv SIZE_MAX
|
|
(stdint.h is already included by grapheme.h) the UTF-8-encoded string
|
|
.Va src
|
|
is interpreted to be NUL-terminated and processing stops when a
|
|
NUL-byte is encountered.
|
|
.Pp
|
|
For non-UTF-8 input data
|
|
.Xr grapheme_to_lowercase 3
|
|
can be used instead.
|
|
.Sh RETURN VALUES
|
|
The
|
|
.Fn grapheme_to_lowercase_utf8
|
|
function returns the number of bytes in the array resulting
|
|
from converting
|
|
.Va src
|
|
to lowercase, even if
|
|
.Va destlen
|
|
is not large enough or
|
|
.Va dest
|
|
is
|
|
.Dv NULL .
|
|
.Sh SEE ALSO
|
|
.Xr grapheme_to_lowercase 3 ,
|
|
.Xr libgrapheme 7
|
|
.Sh STANDARDS
|
|
.Fn grapheme_to_lowercase_utf8
|
|
is compliant with the Unicode 15.0.0 specification.
|
|
.Sh AUTHORS
|
|
.An Laslo Hunhold Aq Mt dev@frign.de
|