MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / operation

Method operation

src/function/string/regex_replace_function.cpp:29–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28struct RegexpReplace {
29 static void operation(string_t& value, string_t& pattern, string_t& replacement,
30 string_t& result, common::ValueVector& resultValueVector, void* dataPtr) {
31 auto bindData = reinterpret_cast<RegexReplaceBindData*>(dataPtr);
32 std::string resultStr = value.getAsString();
33 RE2 re2Pattern{pattern.getAsString()};
34 bindData->replaceFunc(&resultStr, re2Pattern, replacement.getAsString());
35 BaseRegexpOperation::copyToLbugString(resultStr, result, resultValueVector);
36 }
37};
38
39struct RegexReplaceBindDataStaticPattern : public RegexReplaceBindData {

Callers

nothing calls this directly

Calls 1

getAsStringMethod · 0.80

Tested by

no test coverage detected