From 2e04b2c23c66a42372d0ecaea2b0f4b2c7b7c7e5 Mon Sep 17 00:00:00 2001 From: Vincent Douillet Date: Tue, 24 Dec 2024 11:52:50 +0100 Subject: delete files --- str.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'str.h') diff --git a/str.h b/str.h index 76fd186..026d5da 100644 --- a/str.h +++ b/str.h @@ -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 **,...); -- cgit v1.2.3