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

Method operation

src/function/vector_string_functions.cpp:23–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace function {
22
23void BaseLowerUpperFunction::operation(string_t& input, string_t& result,
24 ValueVector& resultValueVector, bool isUpper) {
25 uint32_t resultLen = getResultLen((char*)input.getData(), input.len, isUpper);
26 result.len = resultLen;
27 if (resultLen <= string_t::SHORT_STR_LENGTH) {
28 convertCase((char*)result.prefix, input.len, (char*)input.getData(), isUpper);
29 } else {
30 StringVector::reserveString(&resultValueVector, result, resultLen);
31 auto buffer = reinterpret_cast<char*>(result.overflowPtr);
32 convertCase(buffer, input.len, (char*)input.getData(), isUpper);
33 memcpy(result.prefix, buffer, string_t::PREFIX_LENGTH);
34 }
35}
36
37void BaseStrOperation::operation(string_t& input, string_t& result, ValueVector& resultValueVector,
38 uint32_t (*strOperation)(char* data, uint32_t len)) {

Callers

nothing calls this directly

Calls 3

operationFunction · 0.85
getAsStringMethod · 0.80
getDataMethod · 0.45

Tested by

no test coverage detected