EC_STR_WRAP(3)

NAME
ec_str_wrap - Wrap a text to a maximum number of columns.

SYNOPSIS
#include <ecoli/string.h>

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
);

RETURN VALUE

An allocated string containing the wrapped text. It must be freed by the user using free().

SEE ALSO

ec_str_parse_llint(3), ec_str_startswith(3), ec_str_is_space(3), ec_strcmp_count(3), ec_str_parse_ullint(3), ec_str_quote(3),

COPYRIGHT

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