{strtoupper:string}

Description

Converts a string to upper case. This is the AA counterpart of the PHP strtoupper function. On a UTF-8 install it is multibyte-aware, so accented letters are upper-cased correctly (for example a-acute becomes A-acute); on a non-UTF-8 install only the ASCII letters a-z are converted. Digits, spaces and punctuation pass through unchanged, and a string that is already upper case comes back the same. The input is not trimmed, so leading and trailing spaces are preserved. With no argument the result is an empty string. Use it for all-caps headings, badge and tag labels, acronyms, and case-insensitive comparisons.

Parameters

string optional default empty string

The text to convert to upper case. It can be a literal or, more usually, another expression such as a field value. Letters are upper-cased (UTF-8 aware); digits, spaces and punctuation are left unchanged. The value is not trimmed, so any leading or trailing spaces are preserved.

Examples

test{strtoupper:hello world}
ExpectedHELLO WORLD
ActualHELLO WORLD
The everyday use - turn a lower-case string into all upper case.
test{strtoupper:Action Apps}
ExpectedACTION APPS
ActualACTION APPS
Every letter is upper-cased regardless of its original case; spaces are kept.
test{strtoupper:ABC}
ExpectedABC
ActualABC
A string that is already upper case comes back identical - the command is safe to apply unconditionally.
test{strtoupper:report-2024.final}
ExpectedREPORT-2024.FINAL
ActualREPORT-2024.FINAL
Only letters change case. Digits, hyphens, dots and other punctuation are left exactly as they are.
test{strtoupper:}
The string parameter defaults to an empty string, so calling the command with nothing returns nothing.
virtual{strtoupper: padded }
Expected( PADDED with surrounding spaces preserved)
Actual PADDED
The input is NOT trimmed, so a leading and a trailing space survive into the output ( PADDED with a space on each side). Marked illustrative because edge whitespace is not reliably comparable once rendered in HTML.
test{strtoupper:{item:ce4ac95c48c3bbe590b80794e47c3e7b:_#SHORTTXT}}
ExpectedHELLO WORLD
ActualHELLO WORLD
The real pattern: feed another field into strtoupper. Here the short-text field of a fixture item (value Hello World) is read and upper-cased. To read the target items own field inside item: use its _#ALIAS, not a field-getter.
virtual<h2>{strtoupper:{item:ce4ac95c48c3bbe590b80794e47c3e7b:_#SHORTTXT}}</h2>
Expected

HELLO WORLD

Actual

HELLO WORLD

A typical template use - wrap an upper-cased field value in a heading or a badge for an all-caps look without hard-coding the capitals. Illustrative because the output is HTML markup, which the page renders rather than compares as text.