MCPcopy Create free account
hub / github.com/Snapchat/Valdi / indentString

Function indentString

valdi_core/src/valdi_core/cpp/Utils/StringBox.cpp:124–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124std::string indentString(const std::string& input) noexcept {
125 std::stringstream ss(input);
126 std::string to;
127 std::string out;
128 bool isFirst = true;
129
130 while (std::getline(ss, to, '\n')) {
131 if (!isFirst) {
132 out += "\n";
133 }
134 isFirst = false;
135 out += " ";
136 out += to;
137 }
138
139 return out;
140}
141
142void stringReplace(std::string& input, std::string_view searchPattern, std::string_view replacement) noexcept {
143 for (;;) {

Callers 1

toStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected