al_ustr_ncompare(3alleg5)

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

πŸ’– 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 us1 comes after us2 πŸ‘‘
  • 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