EC_STR_WRAP(3)

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

✨ NAME ✨

okay so bestie, welcome to the Libecoli Programmer's Manual page for ec_str_wrap πŸ’– β€” she wraps a text to a maximum number of columns. that's it. that's the job. and she eats every single time πŸ’…


🌸 SYNOPSIS 🌸

first you gotta invite her in:

#include <ecoli/string.h>

then the whole summoning ritual, exactly like this, no cap:

char * ec_str_wrap(
    const char   *str,        /* The input text. */
    size_t        max_cols,   /* The maximum number of columns. */
    /*
     * The number of already consumed columns on the first line, filled with
     * padding in other lines.
     */
    size_t        start_off
);

let's break the girlies down πŸŽ€:

  • str β€” the input text, literally just the words you're handing over.
  • max_cols β€” the max number of columns. she will not go past it, periodt.
  • start_off β€” the number of already consumed columns on the first line, and it gets filled with padding in the other lines. lowkey important, don't skip her πŸ™ˆ

πŸ¦‹ RETURN VALUE πŸ¦‹

she hands you back an allocated string holding the wrapped text 🫢. and listen β€” it must be freed by the user using free(). like, you free it. not her. that's your job now. it's giving main character responsibility ✨


🌈 SEE ALSO 🌈

the whole friend group, go say hi πŸ‘‘:


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


and that's the whole page, bestie, you absolutely ate that πŸ“πŸ’…

libecoli 🌟 2026-06-11 🌟 mwah, go free your strings πŸ’–

πŸ“¦ where this page comes from