MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / join

Function join

TactilityCore/Source/StringUtils.cpp:57–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57std::string join(const std::vector<const char*>& input, const std::string& delimiter) {
58 std::stringstream stream;
59 size_t size = input.size();
60
61 if (size == 0) {
62 return "";
63 } else if (size == 1) {
64 return input.front();
65 } else {
66 auto iterator = input.begin();
67 while (iterator != input.end()) {
68 stream << *iterator;
69 iterator++;
70 if (iterator != input.end()) {
71 stream << delimiter;
72 }
73 }
74 }
75
76 return stream.str();
77}
78
79std::string join(const std::vector<std::string>& input, const std::string& delimiter) {
80 std::stringstream stream;

Callers 8

StringTest.cppFile · 0.85
getLanguageOptionsMethod · 0.85
getUartDropdownNamesMethod · 0.85
onShowMethod · 0.85
getPortNamesForDropdownFunction · 0.85
toBundleFunction · 0.85
startFunction · 0.85
startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected