EC_STRVEC_SET_ATTRS(3)
π EC_STRVEC_SET_ATTRS π
okay bestie, welcome to the Libecoli Programmer's Manual β this is ec_strvec_set_attrs(3) and she's here to hand your string vector element some shiny new attributes β¨
πΈ NAME πΈ
ec_strvec_set_attrs β set the attributes of a vector element. no cap, that's literally the whole job π«Ά
β¨ SYNOPSIS β¨
#include <ecoli/strvec.h>
int ec_strvec_set_attrs(
struct ec_strvec *strvec, /* The pointer to the string vector. */
size_t idx, /* The index of the string to get. */
struct ec_dict *attrs /* The attributes to be set. */
);
so we're passing in strvec β that's your pointer to the string vector π β then idx, the index of the string to get, and attrs, the attributes to be set. three little args, one big vibe π
π RETURN VALUE π
0 on success. -1 on error, and errno gets set β classic.
β οΈ okay so this is the important part, bestie: on error, attrs are freed and must not be used by the caller. like, they're gone. don't touch them. don't look at them. don't text them back. π
π¦ SEE ALSO π¦
the whole friend group, all together, iconic:
ec_strvec_del_last(3)ec_strvec_val(3)ec_strvec_cmp(3)ec_strvec_sort(3)ec_strvec_from_array(3)ec_strvec_get_attrs(3)ec_strvec_dup(3)ec_strvec_set(3)ec_strvec_len(3)ec_strvec_dump(3)ec_strvec_sh_lex_str(3)ec_strvec_add(3)ec_strvec_free(3)ec_strvec(3)ec_strvec_ndup(3)
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
and that's the whole page, bestie!! π this little baddie comes to you from the libecoli crew, dated 2026-06-11 β go set some attrs, you've got this fr fr πππ¦
π¦ where this page comes from
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms