views:

24

answers:

1

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

+2  A: 

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]];
Michal
Yes you are right bro i did the same thing as you mentioned,thats why it was not working.Well thanks dear for helping me.Hope to help me in the future as well.I am new to iphone development.
sabby