Skip to main content

$initCapOnce

$initCapOnce(string?) -> string
Compact type signature<s-:s>

If string is omitted, the current context value is used.

Browse categories

Source: FUME

Availability​

Community v3.0.0+
Enterprise v3.0.0+

Earlier Community releases exposed this operation under the name $initCapSingle, not $initCapOnce.

Documentation​

Capitalizes only the first character of a string and leaves the rest of the value unchanged.

Unlike $initCap(), this helper does not trim whitespace or normalize later words. Undefined input returns undefined. Passing a non-string raises the same type error used by other FUME utility helpers.

Examples​

Capitalize only the first character​

Input

"examplecare"

Expression

$initCapOnce($)

Result

"Examplecare"