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

Method InitCap

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

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

Source from the content-addressed store, hash-verified

334// will be mapped to their lower-case equivalents. If input == NULL it
335// will return NULL
336StringVal 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
344StringVal StringFunctions::InitCapAscii(FunctionContext* context, const StringVal& str) {
345 StringVal result(context, str.len);

Callers

nothing calls this directly

Calls 2

GetConstFnAttrMethod · 0.80
implMethod · 0.80

Tested by

no test coverage detected