Thanks bobby. This ensures words are not cut in half, not sentences correct? Or 
did I miss something?

Thanks

Bobby Hartsfield <[EMAIL PROTECTED]> wrote: Been using this forever.
 
Author: Bobby Hartsfield | [EMAIL PROTECTED]
File: trimtext.cfm
Description: This tag will take the text passed to it and create a "teaser"
             Meaning, it will trim the text back and add a trailing ... to
the end 
    Making for a good teaser news article with a "read
more" link.
    
    Give the tag the text to trim and the number of
characters to trim it at
    it will trim to that specified number and work its
way "BACK" to the first 
    space character and add ...
    
--->







the "Trimat" attribute --->
 
  
  attribute ---> 
  

 
  any words in half--->          
  listlen(Cutparagraph, " "), " ")>
  #finalparagraph#...
 
  trimat specifications display it without any editing ---> 
  #paragraph#
 




-----Original Message-----
From: Nate Willard [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 7:23 PM
To: CF-Talk
Subject: Re: Perhaps a little over complicated - Dissecting a String

These are all good steps in the right direction however, I haven't found
anything that ties all this logic together. 

Logic
if first sentence is between 200-250 characters show that setence
if no sentence, show first 250 characters +...
if first sentence is less than 250 sentences, get as many sentences as
possible before hitting 250 characters and output.

Has anyone built something like this?

Thanks

Steve Bryant  wrote: I think you want:
#Left(ListFirst(string,"."),100)#.
(untested)

> Instead of returning say just 100 characters. Is there a way to return 
> the first sentence only if its under 100 characters, and if not then 
> 100 characters resulting in a cut off string. 







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301985
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to