ustrpbrk(3alleg4)
π ustrpbrk β Allegro manual, bestie edition
okay so real quick, this is a page from the Allegro game programming library manual, and the star of the show is ustrpbrk π (the u is for Unicode-coded, iykyk).
β¨ NAME β¨
ustrpbrk β finds the first character that matches any in a set. part of the Allegro game programming library. she's giving "where's waldo but for characters" π΅οΈβοΈ
πΈ SYNOPSIS πΈ
#include <allegro.h>
char *ustrpbrk(const char *s, const char *set);
π¦ DESCRIPTION π¦
okay so here's the tea π: this function hunts down the first character in s that matches any character in set. like, literally any single one of them. the moment it finds one, it's done, she's clocked out, periodt. π
example, because we love a visual:
char *p = ustrpbrk("one,two-three.four", "-. ");
so here she's scanning that string and looking for the first -, ., or space. (spoiler: it's the ,... no wait bestie, , is not in the set π β it's the - after two. the vibe check said nope to everything before it.) β¨
π RETURN VALUE π
she hands you back a pointer to the first match π«Ά β¦ or NULL if none are found. no match, no pointer, just the void. π
π SEE ALSO π
uconvert(3alleg4)ustrchr(3alleg4)ustrchr(3alleg4)... okay no, it'sustrrchr(3alleg4)πustrstr(3alleg4)ustrtok(3alleg4)
and that's the whole page, no cap. this was Allegro version 4.4.3, ustrpbrk(3alleg4), and honestly? iconic. go forth and find your characters, bestie ππ§β¨
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms