GRAPHEME_NEXT_LINE_BREAK(3)

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

okay so bestie, welcome to the Library Functions Manual page for grapheme_next_line_break(3) β€” yes, the manual name is folded in right here, cute and all. this function is literally about finding the offset (in codepoints) to the next possible line break, and it's giving text-layout main character energy. πŸ’…

πŸ’– NAME πŸ’–

grapheme_next_line_break β€” determine codepoint-offset to next possible line break. periodt.

✨ SYNOPSIS ✨

#include <grapheme.h>

size_t
grapheme_next_line_break(const uint_least32_t *str, size_t len);

πŸ¦‹ DESCRIPTION πŸ¦‹

Call grapheme_next_line_break() when you need the offset (in codepoints) to the next possible line break β€” peep libgrapheme(7) for the full lore β€” inside the codepoint array str that has length len. that's the whole quest, no cap.

If you set len to SIZE_MAX β€” and bestie, stdint.h is already included by grapheme.h, so no extra include drama β€” then str is interpreted to be NUL-terminated, and processing stops when a codepoint with the value 0 is encountered. iconic behavior, honestly.

Got UTF-8-encoded input data? grapheme_next_line_break_utf8(3) can be used instead. she's right there. 🌈

πŸŽ€ RETURN VALUES πŸŽ€

The grapheme_next_line_break() function returns the offset (in codepoints) to the next possible line break in str, or 0 if str is NULL. that's it, that's the return value. πŸ’–

πŸ”₯ SEE ALSO πŸ”₯

πŸ‘‘ STANDARDS πŸ‘‘

grapheme_next_line_break() is compliant with the Unicode 17.0.0 specification. we love a standards-compliant icon. ✨

πŸ’œ AUTHORS πŸ’œ

Laslo Hunhold <dev@frign.de>


xoxo, this page is from suckless.org, dated 2022-10-06, and its manual title is GRAPHEME_NEXT_LINE_BREAK(3) πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from