util::Join

Join overloads

Synopses

Declared in <util/string.h>

Join all container items using separator, without transforming them.

template<
    typename C,
    typename S>
auto
Join(
    C const& container,
    S const& separator);
» more...

Join all container items. Typically used to concatenate strings but accepts containers with elements of any type.

template<
    typename C,
    typename S,
    typename UnaryOp>
auto
Join(
    C const& container,
    S const& separator,
    UnaryOp unary_op);
» more...

Return Value

  • The concatenation of the items separated by separator.
  • The concatenation of the transformed items separated by separator.

Parameters

NameDescription
containerThe items to join.
separatorThe separator inserted between items.
unary_opApply this operator to each item