GRAPHEME_TO_TITLECASE_UTF8(3)

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

πŸ’– NAME πŸ’–

grapheme_to_titlecase_utf8 β€” convert UTF-8-encoded string to titlecase.

Okay bestie, welcome to the GRAPHEME_TO_TITLECASE_UTF8(3) page β€” this is the one that takes your UTF-8 string and gives it titlecase energy ✨

🌸 SYNOPSIS 🌸

#include <grapheme.h>

size_t
grapheme_to_titlecase_utf8(const char *src, size_t srclen, char *dest,
    size_t destlen);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so the grapheme_to_titlecase_utf8() function converts the UTF-8-encoded string str to titlecase and writes the result to dest up to destlen, unless dest is set to NULL. No cap, that's the whole gig πŸ’…

If srclen is set to SIZE_MAX (stdint.h is already included by grapheme.h), the UTF-8-encoded string src is interpreted to be NUL-terminated and processing stops when a NUL-byte is encountered. Very β€œstop when you see the NUL” of it πŸ›‘

For non-UTF-8 input data, grapheme_to_titlecase(3) can be used instead. Iconic backup plan 🫢

πŸ”₯ RETURN VALUES πŸ”₯

The grapheme_to_titlecase_utf8() function returns the number of bytes in the array resulting from converting src to titlecase, even if destlen is not large enough or dest is NULL. It’s giving β€œI’ll tell you how much space you actually needed” πŸ’€

πŸ‘€ SEE ALSO πŸ‘€

🌈 STANDARDS 🌈

grapheme_to_titlecase_utf8() is compliant with the Unicode 17.0.0 specification. Periodt, Unicode-approved πŸ‘‘

πŸŽ€ AUTHORS πŸŽ€

Laslo Hunhold <dev@frign.de>


Made with love by suckless.org, dated 2022-10-06 β€” this was GRAPHEME_TO_TITLECASE_UTF8(3), bestie, mwah πŸ’‹

πŸ“¦ where this page comes from