RE: strip quotes

2003-03-10 Thread John Stanley
you can use the replace function or the right function, probably some others
too.

-Original Message-
From: Robert Orlini [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 8: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=subscribeforumid=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



Re: strip quotes

2003-03-10 Thread Todd
replace(string,,,ALL)

At 08:59 AM 3/10/2003 -0500, you wrote:
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



--
Todd Rafferty ([EMAIL PROTECTED]) - http://www.web-rat.com/
Team Macromedia Volunteer for ColdFusion
http://www.macromedia.com/support/forums/team_macromedia/
http://www.devmx.com/

--

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

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



RE: strip quotes

2003-03-10 Thread Charlie Griefer
If you know that the only double-quote will be that last character, you can
do:

#replace(myString, , , all)# (i think that should work...escaping
double quotes inside of double quotes always fries my brain).

You can also use a conditional to check to see if the last character is a
double-quote...and if so, remove that character:

cfif right(myString, len(myString) IS 
cfset myString = right(myString, len(myString)-1)
/cfif

(same caveat applies re: escaping the quote :)

hth,
charlie

-Original Message-
From: Robert Orlini [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 6: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=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

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



RE: strip quotes

2003-03-10 Thread Raymond Camden
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=subscribeforumid=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