Reputation: 181
Is there a way I can avoid escape sequences in literal strings in Objective-C?
For example, in C#, I can prefix the string with @
and type the string normally, like: @"C:\Users"
, without the use of the double backslash "C:\\Users"
Is there a way to do this?
Upvotes: 1
Views: 346
Reputation: 9493
There is no way to do this in Objective-C. A construction like @"string"
generates an NSString
object built from the plain "string"
. And as far as I know, you cannot avoid escaping in the C language.
Upvotes: 1