ustrcat(3alleg4)

πŸ’– ustrcat β€” Allegro manual, bestie edition πŸ’–

okay so you're in the Allegro game programming library section of the manual and you clicked on ustrcat(3alleg4). iconic of you. let's get into it πŸŽ€


✨ SYNOPSIS ✨

#include <allegro.h>

char *ustrcat(char *dest, const char *src);

that's the whole vibe, no cap.


🌸 DESCRIPTION 🌸

so basically this function concatenates src to the end of dest. that's it. that's the function. short king behavior fr fr.

but bestie. listen. you should try to avoid this function because it is very easy to overflow the destination buffer. like, genuinely. it's giving danger. it's giving "why is my game crashing and also why is my neighbor's wifi password in my save file." use ustrzcat instead, that one actually checks stuff. periodt. πŸ’…

not me being dramatic about it, the manpage literally says to avoid it. i'm just saying it louder. 🫢

πŸ‘‘ RETURN VALUE πŸ‘‘

it returns the value of dest. so if you did char *result = ustrcat(dest, src); then result and dest are literally the same pointer. main character energy, no originality, but okay. ✨


πŸ¦‹ SEE ALSO πŸ¦‹

the friend group:

go read the ustrzcat one first, i'm begging you. 😭


and that's the page!! this was the ustrcat(3alleg4) entry from the Allegro manual, version 4.4.3. stay safe out there, check your buffer sizes, and don't say i didn't warn you πŸ’–πŸŽ€πŸŒΈπŸ¦‹βœ¨