Page 1 of 1

De-quote a String

Posted: Tue Dec 14, 2004 1:56 pm
by yaminids
Hello there,

Is there a way to de-quote a string. My intension is to remove the quotes from a input string.
Thanx in advance.

-Yamini

Posted: Tue Dec 14, 2004 2:37 pm
by ray.wurlod
Provided that there are no "quoted quote characters", you can simply use Convert() function.

Code: Select all

Convert('"', '', TheQuotedString)
Another technique is to remove the first and final characters using a substring technique.

Code: Select all

TheQuotedString[2,Len(TheQuotedString)-2]
You may need to trim off leading and trailing white space first. Use TrimF() and TrimB() functions, or Trim() with "B" as the third argument.

De-quote a String

Posted: Tue Dec 14, 2004 6:46 pm
by yaminids
Hello Ray,
Thank you for your suggestion.
-Yamini