ustrcmp(3)

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

✨ ustrcmp(3) ✨

okay so bestie, welcome to the Allegro manual πŸ’– this one's a lil function called ustrcmp, and she lives in the Allegro game programming library. yes, the whole library. she's part of the family 🫢


🌸 NAME 🌸

ustrcmp β€” compares two strings. yep that's it, that's the whole job. Allegro game programming library, no cap.


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro.h>

int ustrcmp(const char *s1, const char *s2);

look at her. two lil const char * girlies walk in, one int walks out. iconic behavior πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

This function compares s1 and s2. that's literally it. it takes your two strings and it's like "hmm, let me look at these" πŸ‘€ and then it tells you how they stack up against each other. main character energy fr fr.


⭐ RETURN VALUE ⭐

here's the vibe check, bestie, listen up:

  • zero β€” the strings are equal. twin flames. soulmates. πŸ’–
  • a positive number β€” s1 comes after s2 in the ASCII collating sequence. she's pulling up late to the function party 🐒
  • a negative number β€” anything else, so s1 comes before s2. she got there early 🌸
not me emphasizing this but: it's zero, positive, or negative. the actual magnitude is not the point. don't be out here comparing the numbers themselves like it's a score, okay? it's a vibe, not a value 😭

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, go say hi:


and that's the whole page, bestie!! this was the ustrcmp(3) page from the Allegro manual, version 4.4.3 🌈 she's short, she's sweet, she compares two strings and she goes home. periodt πŸ’…βœ¨

πŸ“¦ where this page comes from