String Manipulation

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
MarkW
Flowcode v5 User
Posts: 118
Joined: Thu Sep 17, 2009 1:30 pm
Has thanked: 3 times
Been thanked: 11 times
Contact:

String Manipulation

Post by MarkW »

Hello

What would be the most efficient way to setup a string variable such
that the " char can be included into the string? (The problem is that
the string variable uses " " to enclose the string chars, and you cannot
use " inside the string....)
This string variable is then used to be sent out the serial port (uart1).

I did use the concatenation function in the calc icon ie. stringvar = str1+str2+str3,
where str2 is pre-defined as ascii char 0x22 as byte. Then send out stringvar out the uart1.
This works, but was just curious to know if this was the only way, or could
it be done more efficiently?

Thanx

Mark

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: String Manipulation

Post by kersing »

Can't try it myself at the moment, but try adding a backslash (\) before the double quotes. So the string would look like this: "this is an example with \" embedded"
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Post Reply