al_ustr_compare(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

al_ustr_compare β€” bestie, it's the Allegro 5 API's official "who comes first??" girlie ✨


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

int al_ustr_compare(const ALLEGRO_USTR *us1, const ALLEGRO_USTR *us2)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: you've got two strings, us1 and us2, and you need to know which one is bigger. not in a vibes way, in a code point value way. that's literally what this does. no cap.

the tea is:

  • if the strings are equal, you get back zero πŸŽ€
  • if us1 comes after us2, you get back a positive number πŸ‘‘
  • otherwise (so us1 comes before us2), you get back a negative number πŸ’…
🚨 not me being the bearer of bad news but... this does NOT take into account locale-specific sorting rules. like, at all. if that's what you need, bestie, you're gonna have to go use another library. this function said "not my job" and honestly? respect. πŸ™ˆ

🌈 SEE ALSO 🌈


and that's the whole page fr fr 🫢 this came straight out of the Allegro reference manual, from the manual page al_ustr_compare(3alleg5) β€” tysm for reading, mwah, go slay some strings πŸ’œβœ¨πŸ“

πŸ“¦ where this page comes from