MCPcopy Create free account
hub / github.com/SIPp/sipp / join

Function join

src/call.cpp:83–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83std::string join(const std::vector<std::string> &s, const char* delim) {
84 std::ostringstream imploded;
85 std::copy(s.begin(), s.end(), std::ostream_iterator<std::string>(imploded, delim));
86 std::string ret = imploded.str();
87 if (ret.length()) {
88 ret.resize(ret.length() - strlen(delim));
89 }
90 return ret;
91}
92
93std::string trim(const std::string &s) {
94 size_t first = s.find_first_not_of(' ');

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected