diff options
Diffstat (limited to 'string-list.h')
-rw-r--r-- | string-list.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/string-list.h b/string-list.h index 3a6a6dc392..db1284861a 100644 --- a/string-list.h +++ b/string-list.h @@ -38,6 +38,12 @@ int for_each_string_list(struct string_list *list, void filter_string_list(struct string_list *list, int free_util, string_list_each_func_t want, void *cb_data); +/* + * Remove any empty strings from the list. If free_util is true, call + * free() on the util members of any items that have to be deleted. + * Preserve the order of the items that are retained. + */ +void string_list_remove_empty_items(struct string_list *list, int free_util); /* Use these functions only on sorted lists: */ int string_list_has_string(const struct string_list *list, const char *string); |