ustrlen(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ ustrlen β€” bestie edition ✨

okay so this is ustrlen(3), straight out of the Allegro game programming library πŸ’– it counts characters, that's the whole gig, and it's lowkey iconic for it.


🌸 NAME 🌸

ustrlen β€” tells you the number of characters in a string. part of the Allegro game programming library, no cap πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

int ustrlen(const char *s);

πŸ’… DESCRIPTION πŸ’…

so like, this function returns the number of characters in s. that's it. that's the whole function. she's simple, she's clean, she ate πŸ“

but wait β€” plot twist β€” this number doesn't have to equal the string's size in bytes. the way that characters and bytes are just not the same thing?? πŸ’€ yeah. ustrlen is counting actual characters, so if you're out here assuming one char = one byte you are gonna have a bad time, bestie. keep that in mind, fr fr πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘


version 4.4.3 of Allegro, babes β€” that's the vibe, that's the whole page, go forth and count your characters correctly βœ¨πŸ«ΆπŸ’œ

mwah πŸ’‹ slay, and remember: characters β‰  bytes, periodt 🌈⭐

πŸ“¦ where this page comes from