GRAPHEME_IS_LOWERCASE_UTF8(3)

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

πŸ’– GRAPHEME_IS_LOWERCASE_UTF8(3) πŸ’–

okay so bestie, we're in the grapheme girlies' section 3 today β€” yes, that's the Library Functions Manual, and this page is all about grapheme_is_lowercase_utf8 from grapheme.h. buckle up, it's literally so simple it's iconic πŸŽ€


✨ NAME ✨

grapheme_is_lowercase_utf8 β€” checks if a UTF-8-encoded string is lowercase πŸ¦‹


🌸 SYNOPSIS 🌸

#include <grapheme.h>

size_t
grapheme_is_lowercase_utf8(const char *str, size_t len,
    size_t *caselen);

πŸ’… DESCRIPTION πŸ’…

so the grapheme_is_lowercase_utf8() function does exactly what it says on the tin, no cap: it checks whether the UTF-8-encoded string str is lowercase πŸ’œ and then it writes the length of the matching lowercase-sequence into the integer pointed to by caselen β€” unless caselen is set to NULL, in which case she simply doesn't, and that's fine 🫢

now, if len is set to SIZE_MAX (stdint.h is already included by grapheme.h, so don't even worry about it), then the UTF-8-encoded string src is interpreted to be NUL-terminated, and processing stops when a NUL-byte is encountered ⭐

and for non-UTF-8 input data? you can just use grapheme_is_lowercase(3) instead, easy peasy 🧚


πŸ”₯ RETURN VALUES πŸ”₯

grapheme_is_lowercase_utf8() returns true if the UTF-8-encoded string str is lowercase β€” and otherwise, bestie, she returns false πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘


🌈 STANDARDS 🌈

grapheme_is_lowercase_utf8() is compliant with the Unicode 17.0.0 specification ✨ periodt.


πŸŽ€ AUTHORS πŸŽ€

Laslo Hunhold <dev@frign.de> β€” king behaviour honestly πŸ‘‘


okay that's the whole page, love u, go validate some lowercase strings πŸ’–

suckless.org 🌸 2022-10-06 🌸 GRAPHEME_IS_LOWERCASE_UTF8(3) β€” mwah, bye bestie πŸ«ΆπŸ’…

πŸ“¦ where this page comes from