MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / string_strip

Function string_strip

smallthinker/common/common.cpp:403–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403std::string string_strip(const std::string & str) {
404 size_t start = 0;
405 size_t end = str.size();
406 while (start < end && std::isspace(str[start])) {
407 start++;
408 }
409 while (end > start && std::isspace(str[end - 1])) {
410 end--;
411 }
412 return str.substr(start, end - start);
413}
414
415std::string string_get_sortable_timestamp() {
416 using clock = std::chrono::system_clock;

Callers 3

mainFunction · 0.85
read_testsFunction · 0.85
try_parse_reasoningMethod · 0.85

Calls 2

substrMethod · 0.80
sizeMethod · 0.45

Tested by 1

read_testsFunction · 0.68