ustrchr(3alleg4)
π NAME π
okay bestie, so ustrchr is literally the girl who finds the first occurrence of a character in a string π and she's part of the Allegro game programming library β¨ slay
β¨ SYNOPSIS β¨
#include <allegro.h>
char *ustrchr(const char *s, int c);
like, that's the whole vibe check right there π
πΈ DESCRIPTION πΈ
so what she does is: she finds the first occurrence of the character c in the string s. that's it, that's the job, and she ate π₯
here's the moment, fr fr:
char *p = ustrchr("one,two,three,four", ',');
like she's gonna hunt down that very first comma and point at it. iconic behavior honestly π
π¦ RETURN VALUE π¦
she hands you back a pointer to the first occurrence of c in s π«Ά and if there's genuinely no match anywhere? you get NULL. no match, no pointer, we move on π
ngl there's a lil plot twist here: ifcisNULL, she returns a pointer to the end of the string. not the start, not somewhere in the middle β the end. the way that's lowkey cursed but also so valid π
π SEE ALSO π
like the whole friend group, go say hi π
kisses, this was brought to you by Allegro, version 4.4.3, repping the ustrchr(3alleg4) page β stay hydrated and always check your return values πβ¨π
π¦ 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