Template Function cif::join(const V&, std::string_view)

Function Documentation

template<typename V>
std::string cif::join(const V &arr, std::string_view sep)

Join the strings in the array arr using sep as separator.

Example usage:

std::list<std::string> v{ "aap", "noot", "mies" };

assert(cif::join(v, ", ") == "aap, noot, mies");