Add backslash to String in Objective-c

前端 未结 2 1189
庸人自扰
庸人自扰 2020-12-07 04:12

I have a problem identical to this problem here.

I even want to encode the same infromation as him (it\'s a date/time for asp.net)...

When ever I try to add

2条回答
  •  庸人自扰
    2020-12-07 04:54

    The strings and NSLog are working fine for me:

    NSLog(@"\\"); // output is one backslash
    NSLog(@"\\\\"); // output is two backslashes
    NSLog(@"\\/Date(100034234)\\/"); // output is \/Date(100034234)\/
    

    What am I missing?

提交回复
热议问题