wordTruncate()
Description
Truncates text to the specified length of words and replaces the remaining characters with the specified truncate string (which defaults to "...").
Function Syntax
wordTruncate(text [, length, truncateString ])
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
text |
string |
Yes | |
The text to truncate. |
length |
numeric |
No | 5 |
Number of words to truncate the text to. |
truncateString |
string |
No | ... |
String to replace the last characters with. |
Examples
#wordTruncate(text="Wheels is a framework for ColdFusion", length=4)#
-> Wheels is a framework...
#truncate(text="Wheels is a framework for ColdFusion", truncateString=" (more)")#
-> Wheels is a framework for (more)
