GRAPHEME_IS_LOWERCASE(3)

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

πŸ’… GRAPHEME_IS_LOWERCASE(3) β€” library functions manual, bestie edition πŸŽ€

okay so imagine a lil function whose whole personality is checking whether a codepoint array is lowercase. that's her. she's from <grapheme.h>, she lives in the Library Functions Manual section, and she is, frankly, iconic.


✨ NAME ✨

grapheme_is_lowercase β€” check if a codepoint array is lowercase πŸ¦‹


🌸 SYNOPSIS 🌸

#include <grapheme.h>

size_t
grapheme_is_lowercase(const uint_least32_t *str, size_t len,
    size_t *caselen);

πŸ’– DESCRIPTION πŸ’–

so grapheme_is_lowercase() looks at the codepoint array str and is like "hm. lowercase?" and tells you yes or no. but wait, there's more: she also writes the length of the matching lowercase-sequence into the integer that caselen points to. the only exception? if caselen is set to NULL, she simply doesn't do that part. no notes. πŸ’…

now, if len is set to SIZE_MAX (and yes, stdint.h is already included by grapheme.h, so you're covered 🫢), then the codepoint array src gets interpreted as being NUL-terminated, and processing stops the moment a NUL-byte shows up. periodt.

and if your input data is UTF-8-encoded? then grapheme_is_lowercase_utf8(3) can be used instead. she's the sister function, same energy. ✨


⭐ RETURN VALUES ⭐

grapheme_is_lowercase() returns true if the codepoint array str is lowercase, and false otherwise. that's it. that's the whole vibe check. 😌


πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ STANDARDS πŸ‘‘

grapheme_is_lowercase() is compliant with the Unicode 17.0.0 specification. no cap, she's certified. 🌈


πŸŽ€ AUTHORS πŸŽ€

Laslo Hunhold <dev@frign.de> β€” thank you for your service, king 🫢


and that's the whole page, bestie! brought to you by the fine folks at suckless.org, dated 2022-10-06, and if you ever forget, just remember the page is literally called GRAPHEME_IS_LOWERCASE(3) β€” iykyk πŸ’œβœ¨πŸ“

πŸ“¦ where this page comes from