basic: add string_contains_word()
This wraps the common pattern of using extract_first_word() in a loop to look for a matching word.
This commit is contained in:
@@ -280,3 +280,4 @@ char* string_erase(char *x);
|
||||
|
||||
int string_truncate_lines(const char *s, size_t n_lines, char **ret);
|
||||
int string_extract_line(const char *s, size_t i, char **ret);
|
||||
int string_contains_word(const char *string, const char *separators, const char *word);
|
||||
|
||||
Reference in New Issue
Block a user