Link to home
Start Free TrialLog in
Avatar of wilfordrocks
wilfordrocks

asked on

Quotes in a string

When a printer name is passed to Adobe it needs to quotes around it if the string contains blanks.  This two line program shows that in order to get the desired quote mystery slashs are inserted.  I have tried similar things with char[] with no better results.
char ch = '"';
string test = ch + "my string" + ch;
 
Expected result is "my string", actual result is "\my string\".

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of alexpercsi
alexpercsi
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
let me guess ... you determined that it was \"mystring\" by using the debugger? most likely putting your mouse over the variable?

The debugger shows you strings in escaped format...


Greg