MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / vec_as_string

Method vec_as_string

OpenHD/ohd_common/src/openhd_util.cpp:271–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269
270template <typename T>
271std::string OHDUtil::vec_as_string(const std::vector<T>& v) {
272 std::stringstream ss;
273 ss << "[";
274 for (int i = 0; i < v.size(); i++) {
275 ss << std::to_string(v[i]);
276 // ss<<v[i];
277 if (i != v.size() - 1) {
278 ss << ",";
279 }
280 }
281 ss << "]";
282 return ss.str();
283}
284
285std::string OHDUtil::str_vec_as_string(const std::vector<std::string>& v) {
286 std::stringstream ss;

Callers

nothing calls this directly

Calls 2

to_stringFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected