+
+/**
+ * strjoin - Join an array of substrings into one long string
+ * @ctx: the context to tallocate from (often NULL)
+ * @strings: the NULL-terminated array of strings to join
+ * @delim: the delimiter to insert between the strings
+ *
+ * This function joins an array of strings into a single string. The
+ * return value is allocated using talloc. Each string in @strings is
+ * followed by a copy of @delim.
+ *
+ * Example:
+ * // Append the string "--EOL" to each line.
+ * char *append_to_all_lines(const char *string)
+ * {
+ * char **lines, *ret;
+ * unsigned int i, num, newnum;
+ *
+ * lines = strsplit(NULL, string, "\n", NULL);
+ * ret = strjoin(NULL, lines, "-- EOL\n");
+ * talloc_free(lines);
+ * return ret;
+ * }
+ */
+char *strjoin(const void *ctx, char *strings[], const char *delim);