EC_STRVEC_ADD(3)

✨ EC_STRVEC_ADD(3) ✨

okay so bestie, welcome to Libecoli Programmer's Manual, page EC_STRVEC_ADD(3) πŸ’– this one is short and sweet and honestly a lil iconic.


🌸 NAME 🌸

ec_strvec_add β€” the girl whose whole job is adding a string into a vector. that's it. that's the gig. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ecoli/strvec.h>

int ec_strvec_add(
    struct ec_strvec   *strvec,  /* The pointer to the string vector. */
    const char         *s        /* The string to be added at the end of the vector. */
);

so you're passing in two things, no more no less:

  • strvec β€” the pointer to the string vector 🫢 this is the lil container you're adding to.
  • s β€” the string to be added at the end of the vector. emphasis on the end, she goes to the back of the line, no cutting βœ‹

πŸ’œ RETURN VALUE πŸ’œ

  • 0 on success β€” ate, no crumbs, you did it πŸŽ€
  • -1 on error β€” and ngl, errno is set, so go check her, she'll tell you what went wrong 😭

🌈 SEE ALSO 🌈

the whole friend group, fr fr, go read these too:


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.


and that's the whole page, bestie. short, useful, lowkey perfect. go add some strings πŸ’–

this has been libecoli, dated 2026-06-11, signing off β€” mwah 🫢✨

πŸ“¦ where this page comes from