concatenate strings with delimiters
#include <suplib/str.h>char *str_join( const char *delim, size_t n, ... );
const char *delim
- the inter-string delimiter, may be
NULL
size_t n
- the number of strings
...
- the strings
str_join
concatenates a list of strings, separated by the
given delimiter. If any of the passed pointers is NULL
, it
is ignored.
It returns a pointer to a newly allocated buffer containing the the
concatenated string, NULL
if it couldn't allocate the
requisite memory. The caller is responsible for freeing the buffer.