Reputation: 512
I have an XML which I am using to parse news. News have a description. I'm using NSString
to show that description in UILabel
.
But, the description comes like this:
Bad news for Windows’ the researches show that Windows’ for years....
And it is being showed with those unwanted characters in UILabel
. The numbers are changing in every string. They are not the sames.
I want to remove the characters that begins with &#
and the numbers that follow. How can I do that? Which string encoding format should I use?
Thanks a lot.
EDIT: I don't have just one string. If I remove ’ from this one, there might be ᶺ in another one. It won't be removed.
I can remove &# characters and numbers too. But when I do that, In a string like that "In 1980, Jobs told us to৬ do something" the output will be "In , Jobs told us to do something" 1980 will be gone too, but I don't want that. That's a problem either.
Upvotes: 3
Views: 1609