MCPcopy Create free account
hub / github.com/VCVRack/Rack / join

Function join

include/string.hpp:80–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78*/
79template <typename TContainer>
80std::string join(const TContainer& container, std::string seperator = "") {
81 std::string s;
82 bool first = true;
83 for (const auto& c : container) {
84 if (!first)
85 s += seperator;
86 first = false;
87 s += c;
88 }
89 return s;
90}
91
92/** Splits a string into a vector of tokens.
93If `maxTokens > 0`, limits the number of tokens.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected