al_ustr_compare(3alleg5)
π 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
us1comes afterus2, you get back a positive number π - otherwise (so
us1comes beforeus2), 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 π
al_ustr_ncompare(3alleg5)β the compare girlie with a length limit, iykykal_ustr_equal(3alleg5)β just wants to know if they're the same, no ranking drama
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
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms