uremove(3)
π uremove(3) π
okay bestie so this is uremove, straight out of the Allegro manual β yes, the Allegro game programming library, the one that makes your lil game go brrr β¨
πΈ NAME πΈ
uremove β removes a character from a string. Allegro game programming library. that's the whole vibe π
β¨ SYNOPSIS β¨
#include <allegro.h>
int uremove(char *s, int index);
π¦ DESCRIPTION π¦
so here's the tea β β uremove takes the character sitting at the index you gave it, inside the string, and yeets it into the void. but it's not messy about it, no no. it slides the rest of the data back to fill the gap, so there's no lil hole left behind. clean. iconic. main character energy π
and plot twist π β if index is negative, it counts backward from the end of the string instead. so -1 is the last character, -2 is the one before that, you get it, iykyk π«Ά
like for example, here's the vibe:
int length_in_bytes = ustrsizez(text_string);
...
length_in_bytes -= uremove(text_string, -1);
literally just chomping the last char off and keeping your byte count honest ππ
β RETURN VALUE β
it hands you back the number of bytes by which the trailing part of the string was moved β so you know exactly how much stuff shifted over. no cap, that's genuinely useful for keeping your lengths straight π§
π SEE ALSO π
go read those too, they're all in the same friend group fr fr π
mwah π that's a wrap, bestie β this was page uremove(3) from Allegro, version 4.4.3, and it's been a whole delight π slay responsibly β¨ππ¦
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms