diff --git a/src/common/util.c b/src/common/util.c index f99e29df2e..613998eb8e 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -609,6 +609,11 @@ int smartlist_split_string(smartlist_t *sl, const char *str, const char *sep, return n; } +/** Allocate and return a new string containing the concatenation of + * the elements of sl, in order, separated by join. If + * terminate is true, also terminate the string with join. + * Requires that every element of sl is NUL-terminated string. + */ char *smartlist_join_strings(smartlist_t *sl, const char *join, int terminate) { int i;