Return to v2.1 docs


Global Helpers String Functions string controller model migrator migration tabledefinition

Truncates text to the specified length of words and replaces the remaining characters with the specified truncate string (which defaults to "...").

Name 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.
<!--- Outputs "CFWheels is a framework..." --->
#wordTruncate(text="CFWheels is a framework for ColdFusion", length=4)#

Related Functions

String Functions