From c8d0f5cdeb75cde4f5cff9a75daf000f15077acc Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 1 Feb 2022 21:28:26 +0100 Subject: [PATCH] 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 9619ade706824a92ea387bdc9d0d27816bf79da5 --- app/src/util/str.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/util/str.h b/app/src/util/str.h index b81764ef..dfe0cb30 100644 --- a/app/src/util/str.h +++ b/app/src/util/str.h @@ -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` * - * An '\0' is always written at the end of the data, even if no newline - * character is encountered. + * An '\0' is always written at the end of the data string, even if no + * 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 sc_str_truncate(char *data, size_t len, const char *endchars);