From a89bee4c98819567c6e15c0cae32372e32e118f5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 13 May 2009 16:49:34 +1000 Subject: Add new functions and tests: str_list_make_empty(), str_list_make_single() --- lib/util/util.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/util/util.h') 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 @@ -396,6 +396,16 @@ _PUBLIC_ bool strequal(const char *s1, const char *s2); #define LIST_SEP " \t,\n\r" #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 -- cgit