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

Function replace_str

common/train.cpp:376–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374}
375
376std::string replace_str(const char * s, const char * needle, const char * replacement) {
377 std::string str = s;
378 size_t pos = str.find(needle);
379 if (pos != std::string::npos) {
380 str.replace(pos, strlen(needle), replacement);
381 }
382 return str;
383}
384
385void print_duration(double fmillis) {
386 if (fmillis < 1000.0f) {

Callers 1

get_train_filenameFunction · 0.85

Calls 1

findMethod · 0.80

Tested by

no test coverage detected