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

Function token_split

test/httpd.cpp:169–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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