GRAPHEME_TO_TITLECASE(3)
πΈ NAME πΈ
okay so bestie, this is the grapheme_to_titlecase(3) page from the Library Functions Manual β and it does exactly what it says on the tin: grapheme_to_titlecase β convert codepoint array to titlecase. iconic, honestly.
β¨ SYNOPSIS β¨
#include <grapheme.h>
size_t
grapheme_to_titlecase(const uint_least32_t *src, size_t srclen,
uint_least32_t *dest, size_t destlen);
π DESCRIPTION π
The grapheme_to_titlecase() function converts the codepoint array str to titlecase and writes the result to dest up to destlen, unless dest is set to NULL. yes, that is the whole vibe. π
If srclen is set to SIZE_MAX (stdint.h is already included by grapheme.h), the codepoint array src is interpreted to be NUL-terminated and processing stops when a NUL-byte is encountered. lowkey important, so don't skip that part. π«Ά
For UTF-8-encoded input data, grapheme_to_titlecase_utf8(3) can be used instead. slay, there's a whole other function for that. β¨
π«Ά RETURN VALUES π«Ά
The grapheme_to_titlecase() function returns the number of codepoints in the array resulting from converting src to titlecase, even if destlen is not large enough or dest is NULL. so yeah, it still tells you the size you'd need β very main character energy. π
π¦ SEE ALSO π¦
π STANDARDS π
grapheme_to_titlecase() is compliant with the Unicode 17.0.0 specification. no cap, it's official. β
π AUTHORS π
Laslo Hunhold <dev@frign.de>
made with π by suckless.org Β· dated 2022-10-06 Β· straight from the Library Functions Manual, periodt π
π¦ where this page comes from
- nixos 26.05: libgrapheme 3.0.0
- nixpkgs unstable: libgrapheme 3.0.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms