Charmed Quark Systems, Ltd. - Support Forums and Community
CML Macros - Replacing Quotes - Printable Version

+- Charmed Quark Systems, Ltd. - Support Forums and Community (https://www.charmedquark.com/vb_forums)
+-- Forum: General Discussion (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=3)
+--- Forum: CQC Support (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=9)
+--- Thread: CML Macros - Replacing Quotes (/showthread.php?tid=11174)



CML Macros - Replacing Quotes - gReatAutomation - 02-11-2021

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('"');



RE: CML Macros - Replacing Quotes - gReatAutomation - 02-12-2021

I took a different route using ParseQuotedCommaList that worked just fine.


RE: CML Macros - Replacing Quotes - Dean Roddey - 02-13-2021

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.