c++ - Escape charaters are staying in my std::string -


i setting string so:

 std::string findoldstring("<option value=\"" + std::to_string(--selectedvideonumber) + "\">"); 

which requires quotes around selectedvideonumber have used esacape charated "\". problem when findoldstring created still has escape backslashes in , therefore failing next step.

the expected string is:

<option value="1"> 

not:

<option value=\"1\"> 

which 1 being created above

is expected behaviour? how remove them?

the vs debugger adds slashes aid readability. not present in original string. if print it, you'll see not included.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -