al_ustr_ncompare(3alleg5)
π al_ustr_ncompare π
okay bestie, welcome to the Allegro 5 API β¨ this one lives in the Allegro reference manual, and it's genuinely so useful, no cap.
πΈ NAME πΈ
al_ustr_ncompare β the "compare but like, only the first little bit" girlie π
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
int al_ustr_ncompare(const ALLEGRO_USTR *us1, const ALLEGRO_USTR *us2, int n)
π¦ DESCRIPTION π¦
so basically, it's exactly like al_ustr_compare(3alleg5) but it only compares up to the first n code points of both strings π that's the whole plot twist. short attention span comparison. iconic behaviour honestly.
what does it give back? here's the vibe check:
- returns zero if the strings are equal π«Ά
- returns a positive number if
us1comes afterus2π - otherwise it returns a negative number π
that's it, that's the function. ate and left no crumbs π
π₯ SEE ALSO π₯
mwah π that's the page! this one came straight out of the Allegro reference manual (and yeah the footer's date slot is giving mysterious, it didn't bring one, so we're just vibing with the manual name and the version energy β¨). go compare some strings bestie, you've got this π§π
π¦ 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