Reputation: 9390
I want to remove the tags from my string.
For Eg,
NSSTring *str = @"<null>";
My expected output is null.
So i want to remove the HTML tags.
So please guide me.
Thanks.
.
Upvotes: 0
Views: 301
Reputation: 3330
If you want to remove the "<" and ">" symbols then you can use the following code.
string = [string stringByReplacingOccurrencesOfString:@"<" withString:@""];
string = [string stringByReplacingOccurrencesOfString:@">" withString:@""];
Upvotes: 1
Reputation: 51374
Try,
str = [str stringByReplacingOccurrencesOfString:@"<" withString:@""];
str = [str stringByReplacingOccurrencesOfString:@">" withString:@""];
Upvotes: 2