I have a long product description I am trying to truncate. I could just
truncate it, but I don't want to break off sentences. Here is the solution
I came up with but it does not seem to have any effect.
Any ideas?
<cfset variables.description = qry_productsGet.productdescription>
<cfif len(variables.description) gt 200>
<cfloop condition="i eq false">
<cfset variables.description =
listDeleteAt(variables.description,listLen(variables.description, "."),
".")>
<cfif len(variables.description) lte 200>
<cfset i = true>
</cfif>
</cfloop>
</cfif>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360222
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm