Reputation: 2592
i have a webservice and implementing that ,but when i get the array from this weservice its showing 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 me
thanks
Upvotes: 0
Views: 70
Reputation: 4875
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]];
Upvotes: 2