diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2012-09-12 16:04:46 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-12 11:43:25 -0700 |
commit | f103f95b11d087f07c0c48bf784cd9197e18f203 (patch) | |
tree | 97c404425b942675ffedece855f58b5132cd55e5 /Documentation | |
parent | string_list: add a new function, string_list_remove_duplicates() (diff) | |
download | tgif-f103f95b11d087f07c0c48bf784cd9197e18f203.tar.xz |
string_list: add a function string_list_longest_prefix()
Add a function that finds the longest string from a string_list that
is a prefix of a given string.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/technical/api-string-list.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/technical/api-string-list.txt b/Documentation/technical/api-string-list.txt index 0f8b7cee36..32b35d9181 100644 --- a/Documentation/technical/api-string-list.txt +++ b/Documentation/technical/api-string-list.txt @@ -75,6 +75,14 @@ Functions to be deleted. Preserve the order of the items that are retained. +`string_list_longest_prefix`:: + + Return the longest string within a string_list that is a + prefix (in the sense of prefixcmp()) of the specified string, + or NULL if no such prefix exists. This function does not + require the string_list to be sorted (it does a linear + search). + `print_string_list`:: Dump a string_list to stdout, useful mainly for debugging purposes. It |