Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: CML Macros - Replacing Quotes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to find out why I cannot replace a quote using ReplaceChar in a CML Driver using ReplaceChar.

I have a String

Code:
+CMGL: 1,"REC UNREAD","+11231231234","","21/02/11,15:18:09-20"

And I am trying to replace the quotes with blanks

Code:
tempString.ReplaceChar('"', '');

I receive an error

Code:
A badly formed character literal value was seen

This same driver (SMS) does the same thing with no error:

Code:
SendMessage.AppendChar('"');
I took a different route using ParseQuotedCommaList that worked just fine.
The empty character isn't a valid character. If you want to replace with nothing, it has to be with a string, so you'd need to do a substring type replacement of "\"" with "". Not the escapement character to create a quoted string with a quote in it.