rTrim removes spaces. If you want to remove one char from the end, you
can use left.

<cfset newStr = left(oldStr,len(oldStr)-1)>

This says, basically, take N characters from the left where N is the
length minus one.

You could also use a regex to replace a single quote at the end.

This code shows how the regex will remove the quote at the end, but
won't do anything if the quote isn't there...

<cfset str = "Foo moo""">
<cfset str2 = "Ray">

<cfset str = reReplace(str,"""$","")>
<cfset str2 = reReplace(str2,"""$","")>

<cfoutput>#str# - #str2#</cfoutput>

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
Member of Team Macromedia

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Robert Orlini [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 10, 2003 7:59 AM
> To: CF-Talk
> Subject: strip quotes
> 
> 
> Hello,
> 
> I know this is an easy one, but I don't use CF all the time 
> so it escapes me. 
> 
> How do I strip quotes from a string? It appears towards the 
> end; ie: TID=227" Do I use rtrim?
> 
> Thanks.
> 
> Robert Orlini
> HWW 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to