summaryrefslogtreecommitdiff
path: root/string-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'string-list.c')
-rw-r--r--string-list.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/string-list.c b/string-list.c
index 397e6cfa7d..480173fe6d 100644
--- a/string-list.c
+++ b/string-list.c
@@ -145,26 +145,6 @@ void string_list_remove_empty_items(struct string_list *list, int free_util) {
filter_string_list(list, free_util, item_is_not_empty, NULL);
}
-char *string_list_longest_prefix(const struct string_list *prefixes,
- const char *string)
-{
- int i, max_len = -1;
- char *retval = NULL;
-
- for (i = 0; i < prefixes->nr; i++) {
- char *prefix = prefixes->items[i].string;
- if (!prefixcmp(string, prefix)) {
- int len = strlen(prefix);
- if (len > max_len) {
- retval = prefix;
- max_len = len;
- }
- }
- }
-
- return retval;
-}
-
void string_list_clear(struct string_list *list, int free_util)
{
if (list->items) {