| 455 | } |
| 456 | |
| 457 | StringVal 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 | |
| 470 | struct ReplaceContext { |
| 471 | ReplaceContext(StringVal *pattern_in) { |
nothing calls this directly
no test coverage detected