Web service in iphone
i have a webservice and implementing that ,but when i get the array from this weservice its sho开发者_如何学Pythonwing characters like this
line brake in some keys. I am trying to replace that with stringbyreplacing occurance of string but nothing happens. Could anyone help me for this to replace this type of characters,show that when u want to show that data it don't contain this type of character.I am new to iphone development please help methanks
Hard to help without seeing the code, but I guess you are calling stringByReplacingOccurrencesOfString:withString:
, but not assigning the result back to a variable. Notice how this method returns a new object, but does not change the callee.
If you want to remove newlines, I suggest you use stringByTrimmingCharactersInSet:
:
key = [key stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]];
精彩评论