I have a string like s1="[{"tm":1518179874,"net": 5984.294}]"
Wont to replace the " with /".
How to do this with the replace command on the arduino ;D
Thanks for any help.
Cheers, Jan
I have a string like s1="[{"tm":1518179874,"net": 5984.294}]"
Wont to replace the " with /".
How to do this with the replace command on the arduino ;D
Thanks for any help.
Cheers, Jan
Break the string with strchr or strtok; recombine into a new character array and add /" where needed.
PowerSoft:
I have a string like s1="[{"tm":1518179874,"net": 5984.294}]"
really? then the escaping must already be there!
or rather, are you actually trying to parse an incoming string with those characters?
show us your code...
The " character need to be combined into escape sequence in C/C++ like '"'. Try replace(""", "/");.
PowerSoft:
I have a string like s1="[{"tm":1518179874,"net": 5984.294}]"How to do this with the replace command on the arduino ;D
Are you talking about the Edit->Find... in the Arduino text editor?
If you have ONE string it would be easier to just manually edit.
If you have a BUNCH of lines like that:
Replace all {" with {"
Replace all ": with ":
Replace all ," with ,"
That should put the escape character in front of the quote character INSIDE your strings and not the ones that delimit your strings. Don't worry, the compiler will tell you which lines you didn't escape properly and you can edit those manually.