TICKIT_UTF8_MBSWIDTH(3)
π TICKIT_UTF8_MBSWIDTH π
okay bestie, welcome to the TICKIT_UTF8_MBSWIDTH(3) page β that's the library functions manual section, and yes we are in it. this whole page is about three little functions that count the column width of a Unicode string. no cap, that's the vibe. π
β¨ NAME β¨
tickit_utf8_mbswidth, tickit_utf8_byte2col, tickit_utf8_col2byte β count the column width of a Unicode string
π SYNOPSIS π
#include <tickit.h>
int tickit_utf8_mbswidth(const char *str);
int tickit_utf8_byte2col(const char *str, size_t byte);
size_t tickit_utf8_col2byte(const char *str, int col );
Link with -ltickit.
π¦ DESCRIPTION π¦
so these functions are basically a little friend group of shortcut wrappers around tickit_utf8_count(3). they each do one single simple counting operation on a string you hand them. lowkey iconic of them.
but bestie, listen β if you're gonna do multiple operations on the same string, it's more efficient to just use tickit_utf8_count() directly. fr fr. don't do the wrapper thing over and over, it's giving extra work. π
tickit_utf8_mbswidth()β returns the number of columns wide that the given Unicode string consumes. how much horizontal room is this string taking up, basically. πtickit_utf8_byte2col()andtickit_utf8_col2byte()β these two convert between byte indexes and column indexes within a given string. you give one, they hand you the other. mutual bestie behaviour honestly. π«Ά
πΈ RETURN VALUE πΈ
tickit_utf8_mbswidth() and tickit_utf8_byte2col() return an integer column count.
tickit_utf8_col2byte() returns an integer byte count.
that's it. that's the whole return situation. slay. β¨
π SEE ALSO π
and that's the page, bestie!! go forth and count your columns responsibly. πβ¨ππ¦πΈπ
mwah π β this was TICKIT_UTF8_MBSWIDTH(3), from the Library Functions Manual. take care of her, she's doing her best. π«Ά
π¦ where this page comes from
- alpine 3.24: libtickit-doc 0.4.6-r0 Β· MIT
- debian bookworm: libtickit-dev 0.4.3-1 Β· MIT
- debian trixie: libtickit-dev 0.4.3-2 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- nixos 26.05: libtickit 0.4.5
- nixpkgs unstable: libtickit 0.4.6
- ubuntu jammy: libtickit-dev 0.4.1-1 Β· MIT
- ubuntu noble: libtickit-dev 0.4.3-1.1build1 Β· MIT
- ubuntu questing: libtickit-dev 0.4.3-2
- ubuntu resolute: libtickit-dev 0.4.3-2build1 Β· MIT
- ubuntu stonking: libtickit-dev 0.4.3-2build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms