I think the crutch of an embedded quote needs to be "escaped" by itself is a
convenient rule.
----- Original Message -----
From: "Dennis McGrath" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Tuesday, August 25, 2009 1:38 PM
Subject: [RBASE-L] - RE: SSTRIP to strip out an apostrophe from a string
Remember
Set var vtest = 'abdc''def'
Puts the value abc'def in the variable.
Anytime you need a quote embedded in a string you need to represent it by
two quotes within the quoted definition.
The interpreter evaluates that a one embedded quote.
Thus four quotes represents a string containing just one quote.
Dennis McGrath
________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Faith
Sent: Tuesday, August 25, 2009 12:27 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: SSTRIP to strip out an apostrophe from a string
Thanks to both Buddy and Dennis. That worked great.
Faith
________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Walker,
Buddy
Sent: Tuesday, August 25, 2009 12:24 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: SSTRIP to strip out an apostrophe from a string
Faith
SET VAR v1 = (SSTRIP(.VCUSTSRCH,''''))
The four single quotes.
Buddy
From: [email protected] [mailto:[email protected]] On Behalf Of Faith
Sent: Tuesday, August 25, 2009 12:08 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - SSTRIP to strip out an apostrophe from a string
How do you strip a single quote out of a string using SSTRIP?
I am trying to strip apostrophes (single quotes) out of a string and cannot
get a syntax for the SSTRIP to work.
SET VAR vCustSrch = (SSTRIP(.vCustSrch, ''')
THe above treates the two leading quotes as the quote pair and the third
quote as the first of two quotes.
I have tried variations with these manipulations
SET VAR vQuote TEXT = ((CVAL('QUOTE'))
SET VAR vApos TEXT = .vQuote +.vQuote + .vQuote
SET VAR vCustSrch = (SSTRIP(.vCustSrch, .vApos)
set var vSS TEXT = (CHAR(39))+(CHAR(39))+(CHAR(39))
SET VAR vCustSrch = (SSTRIP(.vCustSrch, .vSS)
SET QUOTES = ?
SET VAR vCustSrch = (SSTRIP(.vCustSrch, ?'?)
SET QUOTES = '