summaryrefslogtreecommitdiff
path: root/lib/util/util.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-05-13 16:49:34 +1000
committerAndrew Bartlett <abartlet@samba.org>2009-05-14 05:56:58 +1000
commita89bee4c98819567c6e15c0cae32372e32e118f5 (patch)
treeac92b6ff91a4601526047f574b3bc743a4fb4f11 /lib/util/util.h
parenta13ba4347f92afc63497991210bc59e6bd2434d0 (diff)
downloadsamba-a89bee4c98819567c6e15c0cae32372e32e118f5.tar.gz
samba-a89bee4c98819567c6e15c0cae32372e32e118f5.tar.bz2
samba-a89bee4c98819567c6e15c0cae32372e32e118f5.zip
Add new functions and tests: str_list_make_empty(), str_list_make_single()
Diffstat (limited to 'lib/util/util.h')
-rw-r--r--lib/util/util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/util/util.h b/lib/util/util.h
index f4c2b833af..dab5ff9360 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -397,6 +397,16 @@ _PUBLIC_ bool strequal(const char *s1, const char *s2);
#endif
/**
+ build an empty (only NULL terminated) list of strings (for expansion with str_list_add() etc)
+*/
+_PUBLIC_ char **str_list_make_empty(TALLOC_CTX *mem_ctx);
+
+/**
+ place the only element 'entry' into a new, NULL terminated string list
+*/
+_PUBLIC_ char **str_list_make_single(TALLOC_CTX *mem_ctx, const char *entry);
+
+/**
build a null terminated list of strings from a input string and a
separator list. The separator list must contain characters less than
or equal to 0x2f for this to work correctly on multi-byte strings