# String Format Parser (/placeholders/parsers/stringFormat)



## Usage [#usage]

`{lower:Text}` - converts the text to lowercase

`{upper:Text}` - converts the text to uppercase

`{capitalize:Text}` - capitalizes the first character of the text

`{escape:Text}` - escapes special characters (for example, `|` becomes `\|`)

## Examples [#examples]

* Input: `{lower:Hello Parbez!}` → `hello parbez!`
* Input: `{upper:Hello Parbez!}` → `HELLO PARBEZ!`
* Input: `{capitalize:hello parbez!}` → `Hello parbez!`
* Input: `{escape:Hello| Parbez!}` → `Hello\| Parbez!`

## Ordinal Format Parser [#ordinal-format-parser]

The `OrdinalFormatParser` converts an integer into its ordinal representation (e.g., `1` → `1st`, `2` → `2nd`, `3` → `3rd`, `4` → `4th`). If the input is not a valid number, it returns `null`.

## Usage [#usage-1]

`{ordinal:number}`

## Examples [#examples-1]

* Input: `{ordinal:1}` → `1st`
* Input: `{ordinal:22}` → `22nd`
* Input: `{ordinal:103}` → `103rd`

## Notes [#notes]

* The string-formatting tags operate on the literal payload provided - you can pass variables such as `{lower:{member.name}}`.
* Use `escape` when you need to include characters that would otherwise be parsed (like `|`).
