GRAPHEME_IS_TITLECASE_UTF8(3)

πŸ“¦ version 3.0.0, in nixos 26.05, nixpkgs unstable

πŸ’– 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