Miscellaneous
wordTruncate()
Signature
Section titled “Signature”wordTruncate() — returns any
Description
Section titled “Description”Truncates text to the specified length of words and replaces the remaining characters with the specified truncate string (which defaults to ”…”).
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | yes | — | The text to truncate. |
length | numeric | yes | 5 | Number of words to truncate the text to. |
truncateString | string | yes | ... | String to replace the last characters with. |
Examples
Section titled “Examples”#wordTruncate(text="Wheels is a framework for ColdFusion", length=4)# -> CFWheels is a framework... #truncate(text="Wheels is a framework for ColdFusion", truncateString=" (more)")# -> CFWheels is a framework for (more)