EC_STRVEC_SET(3)

✨ EC_STRVEC_SET ✨

okay bestie, welcome to the Libecoli Programmer's Manual πŸ’– you're looking at ec_strvec_set(3) and honestly? it does exactly what it says on the tin, no notes.


🌸 NAME 🌸

ec_strvec_set β€” set a string in the vector at the index you specify πŸ’…

like, you point at a spot in your string vector, you hand over a string, boom, that spot now holds that string. that's the whole vibe. iconic behavior, truly.


πŸŽ€ SYNOPSIS πŸŽ€

#include <ecoli/strvec.h>

int ec_strvec_set(
    struct ec_strvec   *strvec,  /* The pointer to the string vector. */
    size_t              idx,     /* The index of the string to set. */
    const char         *s        /* The string to be set. */
);

so the cast is giving very:

  • struct ec_strvec *strvec β€” the pointer to the string vector 🫢 that's your girl, the vec you're messing with
  • size_t idx β€” the index of the string to set πŸ“ which slot are we touching
  • const char *s β€” the string to be set ✨ the actual text going in

three args, zero drama. the comments in there are literally verbatim from the original bestie, i'm not touching those, they're part of the lore.


⭐ RETURN VALUE ⭐

  • 0 β€” success, slay, we ate πŸ‘‘
  • -1 β€” error, and errno is set 😭 (go check errno, it's spilling the tea)
fr fr, always check that return value. -1 means something went sideways and errno is the one holding the receipts πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, iykyk 🌈 go read these too, they're all connected:


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


and that's the whole page, bestie 🧚 this was the Libecoli Programmer's Manual entry for EC_STRVEC_SET(3), dated 2026-06-11, brought to you by libecoli 🌈 mwah, go forth and set some strings, you've got this πŸ’–βœ¨

πŸ“¦ where this page comes from