al_ustr_rtrim_ws(3)
β¨ al_ustr_rtrim_ws(3) β¨
okay so bestie, this one's from the Allegro 5 API and it's genuinely so useful β it's giving "little function, big main character energy" π
π SYNOPSIS π
#include <allegro5/allegro.h>
bool al_ustr_rtrim_ws(ALLEGRO_USTR *us)
πΈ DESCRIPTION πΈ
So the vibe here is: you've got a string, and it's got all this extra whitespace hanging off the right end (that's the trailing side, bestie β the end of the string, the "right" trim) and you want it gone. That's literally the whole job.
It removes all those trailing ("right") whitespace characters from the string, and the definition of "whitespace" is exactly whatever the C function isspace() says it is. So don't come at it with your own opinion about what counts as space β isspace() is the authority here, periodt π
Also it returns a bool, so:
truewhen it worked πfalsewhen there was an error π
Like, it tells you how it went. Communication icon behavior, honestly π«Ά
ngl this is the right-side-only sister of the trim functions β it does not touch the front of your string. Do not expect it to. She has a specific job.
π SEE ALSO π
al_ustr_ltrim_ws(3)β the one that handles the left side πΈal_ustr_trim_ws(3)β the one that does both sides, the overachiever β
and that's the whole page, bestie π¦ no cap, it's a short one β this little diva clocks in, trims the trailing whitespace, tells you true or false, and leaves. iconic.
π this was the Allegro reference manual, al_ustr_rtrim_ws(3) β mwah, go trim something π
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms