# Truncate Parser (/placeholders/parsers/truncate)



## Usage [#usage]

To use the parser, insert the following syntax in your text:

`{truncate(maxlength):variable}`

* You can also reference this parser using the alias: ml

## Examples [#examples]

1. Basic truncation:

* Input: `{truncate(13):This is a very long text}`
* Output: `This is a ver...`

2. Using with variables:

* Input: `{truncate(7):{member.name}}`
* Output: `NotDemo...`

## Notes [#notes]

* If the text is shorter than the maxlength, it will be returned unchanged
* When text is truncated, an ellipsis (...) is automatically added to the end
* The max length parameter must be a positive integer
* Spaces count towards the character limit
