MCPcopy Create free account
hub / github.com/apache/impala / InitCapUtf8

Method InitCapUtf8

be/src/exprs/string-functions-ir.cc:457–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455}
456
457StringVal StringFunctions::InitCapUtf8(FunctionContext* context, const StringVal& str) {
458 return Utf8CaseConversion(context, str,
459 [](uint32_t wide_char, bool* word_start) {
460 if (UNLIKELY(iswspace(wide_char))) {
461 *word_start = true;
462 return wide_char;
463 }
464 uint32_t res = *word_start ? std::towupper(wide_char) : std::towlower(wide_char);
465 *word_start = false;
466 return res;
467 });
468}
469
470struct ReplaceContext {
471 ReplaceContext(StringVal *pattern_in) {

Callers

nothing calls this directly

Calls 1

Utf8CaseConversionFunction · 0.85

Tested by

no test coverage detected