本文介绍了NSString @" \"添加反斜杠字符objective-c的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有人知道在Objective中向 NSString
添加单个反斜杠( \
)的简单方法-C?我想要一个 NSString * temp = @\ / Date(100034234)\ /
;
解决方案
字符串 @\\
是一个单反斜杠, @\\\\
是双反斜杠
Does anyone know of an easy way to add a single backslash (\
) to a NSString
in Objective-C? I am trying to have a NSString *temp = @"\/Date(100034234)\/"
;
I am able to get a double backslash or no backslash, but unable to get a single backslash. Any help would be appreciated. Thanks
解决方案
The string @"\\"
is a single backslash, @"\\\\"
is a double backslash
这篇关于NSString @" \"添加反斜杠字符objective-c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!