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

Function regex_escape

smallthinker/common/common.cpp:467–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467std::string regex_escape(const std::string & s) {
468 static const std::regex special_chars("[.^$|()*+?\\[\\]{}\\\\]");
469 return std::regex_replace(s, special_chars, "\\$0");
470}
471
472std::string string_join(const std::vector<std::string> & values, const std::string & separator) {
473 std::ostringstream result;

Calls

no outgoing calls

Tested by

no test coverage detected