Wraps text so that each line has a specified maximum number
of characters.
wrap(String, limit [, strip])
→ returns string
false
true
false
sentence = "This is a standard sentence.";
wrappedSentence = wrap(sentence, 7);
writeOutput(wrappedSentence);
Expected Result: This is a standar d senten ce.
<cfset sentence = "This is a standard sentence." />
<cfset wrappedSentence = wrap(sentence, 7) />
<cfoutput>#wrappedSentence#</cfoutput>
Expected Result: This is a standar d senten ce.
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.