string-util: let's add helper for truncating string after a specified number of lines

This commit is contained in:
Lennart Poettering
2020-01-13 16:07:06 +01:00
parent 5749698031
commit 8dd6491ef9
3 changed files with 131 additions and 0 deletions

View File

@@ -280,3 +280,5 @@ static inline char* str_realloc(char **p) {
}
char* string_erase(char *x);
int string_truncate_lines(const char *s, size_t n_lines, char **ret);