diff options
Diffstat (limited to 'str.h')
-rw-r--r-- | str.h | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -29,12 +29,24 @@ */ /* - * Returns a newly allocated string that contains the beginning of the - * provided string up to the provided char. + * Returns a newly allocated string that contains the part of the provided + * string before the separator character. */ -char *str_split(const char *, char); +char *str_head(const char *, char); + +/* + * Returns a newly allocated string that contains the part of the provided + * string after the separator character. + */ +char *str_tail(const char *, char); /* * Replaces a char in-place in the provided string. */ void str_replace(char *, char, char); + +/* + * Concatenates the provided NULL-terminated list of strings into the given + * string pointer. Returns the size of the created string or 0 in case of error. + */ +size_t str_concat(char **,...); |