You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

abbr()

Usage

abbr(string, maxLength)

Description
Abbreviates the given string to the given maximum length and replaces the remaining character with the ellipsis character (…).

Example

${abbr('A long string that is too long to be displayed entirely.', 20)}

results in

A long string that…

Search results for "abbr()"

abbr()

Abbreviates the given string at the last space character before the maximum length is reached.
The remaining characters are replaced with the ellipsis character (…) or the given abbr parameter.

abbr(string, maxLength [, abbr = '…' ] )