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 c54b816244..decfa747fc 100644
--- a/string-list.c
+++ b/string-list.c
@@ -136,26 +136,6 @@ void filter_string_list(struct string_list *list, int free_util,
list->nr = dst;
}
-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) {