STRCINS(3pub)

πŸ’– STRCINS(3pub) πŸ’–

okay bestie, welcome to STRCINS(3pub), a page from the C Programmer's Manual and honestly? it's a lil baby function but it's so useful. let's get into it ✨


🌸 NAME 🌸

strcins β€” insert a character at the beginning of a string πŸŽ€

✨ SYNOPSIS ✨

#include <publib.h>
void strins(char *str, int c);

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, strcins inserts the character c at the very beginning of the string str. like it just... pops it right up front, front row, main character energy πŸ‘‘

⚠️ real talk though: the target string must contain enough memory to hold the result. no cap. if it doesn't have room, that's on you, not on strcins 😭

πŸ’œ SEE ALSO πŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

Lars Wirzenius (lars.wirzenius@helsinki.fi) β€” ty for your service king 🫢


and that's the whole vibe check, bestie! this page is from Publib's C Programmer's Manual, STRCINS(3pub) section, so go forth and insert characters at the front of strings responsibly πŸ’…πŸŒˆβ­

πŸ“¦ where this page comes from