MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / apply_transform

Function apply_transform

subprojects/llama.cpp/common/jinja/string.cpp:116–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115using transform_fn = std::function<std::string(const std::string&)>;
116static string apply_transform(string & self, const transform_fn & fn) {
117 for (auto & part : self.parts) {
118 part.val = fn(part.val);
119 }
120 return self;
121}
122
123string string::uppercase() {
124 return apply_transform(*this, [](const std::string & s) {

Callers 4

uppercaseMethod · 0.85
lowercaseMethod · 0.85
capitalizeMethod · 0.85
titlecaseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected