Returns a string identical to the input, but with the first character of each word mapped to its upper-case equivalent. All other characters will be mapped to their lower-case equivalents. If input == NULL it will return NULL
| 334 | // will be mapped to their lower-case equivalents. If input == NULL it |
| 335 | // will return NULL |
| 336 | StringVal StringFunctions::InitCap(FunctionContext* context, const StringVal& str) { |
| 337 | if (str.is_null) return StringVal::null(); |
| 338 | if (context->impl()->GetConstFnAttr(FunctionContextImpl::UTF8_MODE)) { |
| 339 | return InitCapUtf8(context, str); |
| 340 | } |
| 341 | return InitCapAscii(context, str); |
| 342 | } |
| 343 | |
| 344 | StringVal StringFunctions::InitCapAscii(FunctionContext* context, const StringVal& str) { |
| 345 | StringVal result(context, str.len); |
nothing calls this directly
no test coverage detected