Add bt2c::join()
This new function template joins the strings of some container with
some delimiter.
The container needs a forward iterator and its elements need the data()
and size() methods.
The container may be empty.
For example:
int main()
{
std::cout << bt2c::join(std::vector<std::string> {
"salut", "meow", "mix"
}, ", ") << '\n';
}
will print
salut, meow, mix
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Id3ff90cf3b2fa4336b71860dbe3c0dff83668607
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12735
This page took 0.024434 seconds and 4 git commands to generate.