How to escape a comma in a tuple string

I never realized that you could escape a comma in a tuple string this way: "( zero, one, ), two"

Q: tuple string items 0 of ( "zero, one, two" ; "( zero, one, ), two" )
A: zero
A: zero, one,
T: 0.030 ms
I: plural string

I noticed the Fixlet Debugger and Analysis results sometimes have results wrapped with () and I didn’t realize why until I noticed that it was only the results with a , with a space that would otherwise be an issue for the tuple string item inspector.

This led me to test it out, and it appears to work the way I expect.


But, this then leads to this counterintuitive result:

Q: tuple string items of "( zero ), one, ( two )"
A: zero
A: one
A: two
T: 0.051 ms
I: plural string

Even if not used to escape a comma, it still gets stripped away.

I don’t think this is an issue, just something to be aware of.

In general, the tuple string item inspector is powerful, but also fragile.

2 Likes