GRAPHEME_IS_TITLECASE_UTF8(3)
π GRAPHEME_IS_TITLECASE_UTF8(3) β the manual, but make it make sense π
okay bestie, so this is from the grapheme library (yes, the manual page header literally says GRAPHEME_IS_TITLECASE_UT(3) β a little typo moment, we move), and it's all about checking whether your UTF-8 string is giving titlecase energy. let's get into it β¨
πΈ NAME πΈ
grapheme_is_titlecase_utf8 β check if a UTF-8-encoded string is titlecase, no cap π
π¦ SYNOPSIS π¦
#include <grapheme.h>
size_t
grapheme_is_titlecase_utf8(const char *str, size_t len,
size_t *caselen);
β¨ DESCRIPTION β¨
so the grapheme_is_titlecase_utf8() function checks if the UTF-8-encoded string str is titlecase, and it writes the length of the matching titlecase-sequence to the integer pointed to by caselen β unless caselen is set to NULL, in which case it just doesn't do that part, periodt π«Ά
if len is set to SIZE_MAX (and heads up: stdint.h is already included by grapheme.h, so you're covered π), then the UTF-8-encoded string src is interpreted to be NUL-terminated, and processing stops when a NUL-byte is encountered. like it just knows when to stop, main character energy fr fr π
for non-UTF-8 input data, you can use grapheme_is_titlecase(3) instead β that's your girl for the other encodings π
π RETURN VALUES π
the grapheme_is_titlecase_utf8() function returns true if the UTF-8-encoded string str is titlecase, otherwise false. simple as that, slay π
π SEE ALSO π
β STANDARDS β
grapheme_is_titlecase_utf8() is compliant with the Unicode 17.0.0 specification. iconic behavior, honestly π₯
π AUTHORS π
Laslo Hunhold <dev@frign.de> β the legend herself π«‘
okay that's the whole vibe check bestie, and just so you have the receipts: this page comes from suckless.org, dated 2022-10-06, and its manual-page name is GRAPHEME_IS_TITLECASE_UTF8(3). go forth and titlecase correctly, i'm obsessed for you π§ββοΈπ
π¦ 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