字符串中出现替换问题
当我从 xml api web 服务获取结果时,我遇到了问题,我使用
NSString *productName = [[paramName stringByReplacingOccurrencesOfString:@"\"" withString:@""] mutableCopy];
paramName 是函数的参数,但它无法替换数据库中的 \ 字符串,
请帮助我......谢谢。
我只想将 \ 替换为 none @"" 但它现在不起作用...请帮助我..!!
我在它工作之前尝试过,但现在不工作..! :(
i am getting the problem when i get the result from the xml api web service i use
NSString *productName = [[paramName stringByReplacingOccurrencesOfString:@"\"" withString:@""] mutableCopy];
paramName is the argument of the function, but it can't replace the \ string which are on database
please help me out... thanks.
i only want to replace \ to none @"" but its not working now... please help me.. !!
i tried before its working but its not working now .. !! :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许,您的意思是
@"\\"
,而不是@"\""
。看起来您正在尝试删除引号,而不是反斜杠。Probably, you meant
@"\\"
, not@"\""
. It looks like you're trying to kill quotes, not backslashes.