MCPcopy Create free account
hub / github.com/bloomberg/pystack / join

Function join

src/pystack/_pystack/pytypes.cpp:17–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace {
16template<typename Range, typename Value = typename Range::value_type>
17std::string
18join(Range const& elements, const char* const delimiter)
19{
20 std::ostringstream os;
21 auto b = begin(elements), e = end(elements);
22
23 if (b == e) {
24 return "";
25 }
26
27 std::copy(b, prev(e), std::ostream_iterator<Value>(os, delimiter));
28 os << *prev(e);
29
30 return os.str();
31}
32} // namespace
33
34static const std::string ELLIPSIS = "...";

Callers 2

formatSequenceFunction · 0.85
toStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected