Fix sc_str_truncate() documentation
The function was initially implemented to truncate lines, but was later
generalized to accept custom delimiters. The whole documentation has not
been updated accordingly.
Refs 9619ade706
This commit is contained in:
parent
22d9f0faf4
commit
c8d0f5cdeb
1 changed files with 3 additions and 3 deletions
|
@ -106,10 +106,10 @@ sc_str_wrap_lines(const char *input, unsigned columns, unsigned indent);
|
||||||
/**
|
/**
|
||||||
* Truncate the data after any of the characters from `endchars`
|
* Truncate the data after any of the characters from `endchars`
|
||||||
*
|
*
|
||||||
* An '\0' is always written at the end of the data, even if no newline
|
* An '\0' is always written at the end of the data string, even if no
|
||||||
* character is encountered.
|
* character from `endchars` is encountered.
|
||||||
*
|
*
|
||||||
* Return the size of the resulting line.
|
* Return the size of the resulting string (as strlen() would return).
|
||||||
*/
|
*/
|
||||||
size_t
|
size_t
|
||||||
sc_str_truncate(char *data, size_t len, const char *endchars);
|
sc_str_truncate(char *data, size_t len, const char *endchars);
|
||||||
|
|
Loading…
Reference in a new issue