Question

So I have a dictionary that gets populated with keys and values, the only problem is that when you try to enter a string that has this general outline "blah\stuff" and you try to log it, then the value for that key shows "blah\\stuff." I want it to be "blah\stuff" like how the user inputs it. Anyone know how to fix this?

   SMTPPort = "";
"Use SSL" = false;
"User Name_in" = "tia\\voizapp";
"User Name_out" = tia;
isOn = no;
Was it helpful?

Solution

Seems like an escaping issue. If you wanted to get a single backslash into an NSString, you'd use a double-backslash:

NSString* someString = @"blah\\stuff";

Is it possible your code is preserving the double backslash behind the scenes?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top