EC_STR_QUOTE(3)

πŸ“¦
version 0.11.7 Β· 5 versions
, in fedora 44

πŸ’– EC_STR_QUOTE(3) πŸ’–

okay bestie, so this is a page from the Libecoli Programmer's Manual and it's about one (1) little function that is lowkey a whole vibe. sit with me. 🫢


✨ NAME ✨

ec_str_quote β€” quote a string, escaping nested quotes. it's giving "put a lil jacket on your string so nothing inside it escapes". πŸ§₯✨


🌸 SYNOPSIS 🌸

#include <ecoli/string.h>

char * ec_str_quote(
    const char   *str,    /* The string to quote. */
    /*
     * The quote character to use: usually " or ' but can be anything. If 0,

     * select between " or ' automatically.
     */
    char          quote,
    /*
     * If true, always add quotes, else add them only if the string contains
     * spaces or quotes.
     */
    bool          force
);

πŸ’… RETURN VALUE πŸ’…

it hands you back an allocated string, and no cap, you are the one who has to free it β€” call free() on it yourself, bestie. the function is not your mom, it is not cleaning up after you. 😭 own your memory. 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, fr fr:

go read them, they're all iconic in their own way. πŸ‘‘


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


and that's the whole page, bestie!! πŸ’œ this one's from libecoli, dated 2026-06-11, and it lives at section EC_STR_QUOTE(3) β€” go quote some strings, you absolute main character. πŸŒˆβœ¨πŸŽ€

πŸ“¦ where this page comes from