我收到来自 web 服务的响应,如下所示的字符串 -
品牌=公司%%samsung@@modelnumber=webmodel%%GT1910@@Sim=Single%%SingleSim@@3g=yes%%Yes@@wifi=yes%%yes(最高2.1 mbps)
我很困惑将我的回复格式化如下 -
brand=samsung
modelnumber=GT1910
Sim=SingleSim
3g=Yes
wifi=(2.1 mbps upto)
我试图删除特殊字符(@@ and %%)
specialString = [specialString stringByReplacingOccurrencesOfString:@"@@" withString:@"\n"];
specialString = [specialString stringByReplacingOccurrencesOfString:@"%%" withString:@"\n"];
specialString= [specialString stringByReplacingOccurrencesOfString:@" " withString:@""];
我的输出是 -
brand=company
samsung
modelnumber=webmodel
GT1910
Sim=Single
SingleSim
3g=yes
Yes
wifi=yes
(2.1 mbps upto)
如何删除不需要的单词。