uremove(3alleg4)
β¨ uremove β the manual page, but make it cute β¨
okay so bestie, welcome to the Allegro manual, section 3, page uremove π this one's from the Allegro game programming library and it's literally so simple you're gonna slay it.
πΈ NAME πΈ
uremove</purl> β Removes a character from a string. Allegro game programming library. π
π¦ SYNOPSIS π¦
#include <allegro.h>
int uremove(char *s, int index);
π DESCRIPTION π
so basically, uremove takes the character sitting at the index you give it inside the string, yeets it into the void ποΈβ¨, and then slides all the rest of the data back to fill the gap. no holes left behind, no awkward silence, the string just closes ranks like a group chat after someone leaves. π
and listen β if index is negative, it counts <em>backward from the end</em> of the string. so -1 is the last character, -2 is the one before that, you get it. iykyk. π§
Example, because seeing it is believing:
int length_in_bytes = ustrsizez(text_string);
...
length_in_bytes -= uremove(text_string, -1);
see how that works? chop the last char off, and subtract however many bytes got shuffled from your running length. chef's kiss. π
β RETURN VALUE β
It returns the number of bytes by which the trailing part of the string was moved. that's it, that's the number. no cap. π₯
π«Ά SEE ALSO π«Ά
π heads up bestie: index is just a raw index β uremove does not do bounds-checking magic for you, so know where you're pointing before you swing. π
okay that's the whole page, you ate it fr fr ππ this was Allegro, version 4.4.3, manual page uremove(3alleg4) β go forth and remove some characters, main character energy only β¨π¦π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms