diff options
Diffstat (limited to 'common.c')
-rw-r--r-- | common.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -65,6 +65,12 @@ transform_str (char *s, int (*tolower) (int c)) *s = tolower (*s); } +static char * +str_cut_until (const char *s, const char *alphabet) +{ + return xstrndup (s, strcspn (s, alphabet)); +} + static void split_str (const char *s, char delimiter, struct str_vector *out) { |