summaryrefslogtreecommitdiff
path: root/str.h
diff options
context:
space:
mode:
Diffstat (limited to 'str.h')
-rw-r--r--str.h18
1 files changed, 15 insertions, 3 deletions
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 **,...);