数组有额外的符号,而不是我添加的,使用 Objective C 修剪 iPhone 应用程序中的数组
在我的 iPhone 应用程序中,我将字符串值添加到数组中,第一个 strSelectedDir 值将是 xxx-jan16-2011-10.30AM 稍后其值将是 xxx-feb16-2011-02.30PM ,,我使用以下代码将这 2 个值添加到数组 arrDownloadedDirNames 中,
[arrDownloadedDirNames addObject:strSelectedDir];
但在输出数组中一些新行符号(\n ) 和像 \ "" 这样的符号如下所示,
(
"(\n \"xxx-jan16-2011-10.30AM\"\n)",
"xxx-feb16-2011-02.30PM"
)
but i want array should be like this with no extra symbols other than which are in the input string
(
xxx-jan16-2011-10.30AM ,
xxx-feb16-2011-02.30PM
)
我该怎么做,为什么要添加额外的符号?我怎样才能删除那些 请任何人帮助我,提前致谢
in my iphone app i am adding string values to the array first strSelectedDir value ill be
xxx-jan16-2011-10.30AM later its value ill be xxx-feb16-2011-02.30PM ,,i am adding these 2 values into the array arrDownloadedDirNames using the following code
[arrDownloadedDirNames addObject:strSelectedDir];
but in the out put array some new line symbols(\n) and symbols like \ "" are coming as shown bellow
(
"(\n \"xxx-jan16-2011-10.30AM\"\n)",
"xxx-feb16-2011-02.30PM"
)
but i want array should be like this with no extra symbols other than which are in the input string
(
xxx-jan16-2011-10.30AM ,
xxx-feb16-2011-02.30PM
)
how can i do this, why extra symbols are added? how can i remove those
please can any one help me,, thanx in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜你的字符串来自 Parse 或者其他什么,对吗?
您看到的额外符号称为转义序列:
\n = linebreake
\" = "
你可以很容易地替换这个角色。
干杯
内茨
I guess your String is from a Parse or something right?
The extra symbols you see are called Escape Sequences:
\n = linebreake
\" = "
You can replace this Charakters pretty easy.
Cheers
nettz