MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / replace_all

Function replace_all

src/visualization/shader.cpp:36–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34namespace {
35
36void replace_all(std::string& text,
37 const std::string_view from,
38 const std::string_view to) {
39 auto pos = std::size_t{0};
40 while ((pos = text.find(from, pos)) != std::string::npos) {
41 text.replace(pos, from.size(), to);
42 pos += to.size();
43 }
44}
45
46std::string adapt_shader_source_for_gles(const GLuint type,
47 std::string source) {

Callers 1

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected