MCPcopy Create free account
hub / github.com/Codesire-Deng/co_context / token_split

Function token_split

test/httpd_MT.cpp:172–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172std::span<char> token_split(std::span<char> &str, char c) {
173 auto it = std::ranges::find(str, c);
174 if (it != str.end()) [[likely]] {
175 *it = '\0';
176 std::span<char> result = {str.begin(), it + 1};
177 str = {it + 1, str.end()};
178 return result;
179 } else {
180 std::span<char> result = str;
181 str = {};
182 return result;
183 }
184}
185
186void str_tolower(std::span<char> str) {
187 for (char &c : str) {

Callers 1

sessionFunction · 0.70

Calls 3

endMethod · 0.80
beginMethod · 0.80
findFunction · 0.70

Tested by

no test coverage detected