aboutsummaryrefslogtreecommitdiff
path: root/Documentation/technical/api-string-list.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/technical/api-string-list.txt')
-rw-r--r--Documentation/technical/api-string-list.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/technical/api-string-list.txt b/Documentation/technical/api-string-list.txt
index 1dcad47f7..300b30109 100644
--- a/Documentation/technical/api-string-list.txt
+++ b/Documentation/technical/api-string-list.txt
@@ -33,6 +33,9 @@ member (you need this if you add things later) and you should set the
. Can remove individual items of an unsorted list using
`unsorted_string_list_delete_item`.
+. Can remove items not matching a criterion from a sorted or unsorted
+ list using `filter_string_list`.
+
. Finally it should free the list using `string_list_clear`.
Example:
@@ -61,6 +64,14 @@ Functions
* General ones (works with sorted and unsorted lists as well)
+`filter_string_list`::
+
+ Apply a function to each item in a list, retaining only the
+ items for which the function returns true. 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.
+
`print_string_list`::
Dump a string_list to stdout, useful mainly for debugging purposes. It