>What about ><cfoutput>#Left(getRewards.reward_description, 100)#</cfoutput> > >On 10/8/06, terry yee <[EMAIL PROTECTED]> wrote: >>
The problem with this solution is that it may cut off words in the middle once you've hit the 100 count. A better solution is to stop at the nearest word. There's UDF in cflib.org that does just that: http://www.cflib.org/udf.cfm?ID=329 >From the site: Description An enhanced version of left() that doesn't cut words off in the middle; instead, it searches backward until it finds a full word. Warnings Note that FullLeft() acts just like the built-in function Left() in the event only one word is passed to it, or the count parameter is less than the length of the first word in the passed string. hth, -- Larry C. Lyons Web Analyst BEI Resources American Type Culture Collection http://www.beiresources.org email: llyons(at)atcc(dot)org tel: 703.365.2700.2678 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255957 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4