MCPcopy Create free account
hub / github.com/MegEngine/MegCC / trim

Function trim

compiler/lib/KernelGen/Utils/StringTemplate.cpp:9–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace {
8
9void trim(std::string& s) {
10 if (s.empty()) {
11 return;
12 }
13
14 s.erase(0, s.find_first_not_of(" "));
15 s.erase(s.find_last_not_of(" ") + 1);
16}
17std::string render_with_cbk(
18 const std::string& template_str, std::regex regx,
19 const StringTemplate::KvMap kv_map, const StringTemplate::FuncMap func_map) {

Callers 1

render_with_cbkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected