MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / replace

Function replace

external/ggml/examples/common.cpp:141–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141std::string replace(const std::string & s, const std::string & from, const std::string & to) {
142 std::string result = s;
143 size_t pos = 0;
144 while ((pos = result.find(from, pos)) != std::string::npos) {
145 result.replace(pos, from.length(), to);
146 pos += to.length();
147 }
148 return result;
149}
150
151void gpt_vocab::add_special_token(const std::string & token) {
152 special_tokens.push_back(token);

Callers 5

prepare_pocket_tts_textFunction · 0.85
ggml_vk_instance_initFunction · 0.85
write_output_filesFunction · 0.85
json_parseFunction · 0.85

Calls 2

findMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected