$initCap
$initCap(string?) -> stringCompact type signature
<s-:s>If string is omitted, the current context value is used.
Source: FUME
Documentation
Returns str after performing a $trim operation and capitalizing the first letter of each word.
Examples
Normalize whitespace and title-case a note
Input
This example uses the free-text-notes example input. The expression reads the last note and normalizes its casing and whitespace.
Example input
JSON
[
" follow-up recommended in 2 weeks ",
"reports intermittent headache; DX-001 noted",
"plan PLAN-100: confirm eligibility for mbr-3001",
"lab LAB-1002 flagged as HIGH; repeat test",
"pat-0001: patient prefers morning appointments",
"normalize multiple spaces"
]
Expression
$initCap($[5])
Result
"Normalize Multiple Spaces"