Does objective c have a strip tags function?
问题 I am looking for an objective C function (custom or built-in) that strips html tags from a string, similar to PHP's version that can be found here: http://php.net/manual/en/function.strip-tags.php Any help would be appreciated! 回答1: This just removes < and > characters and everything between them, which I suppose is sufficient: - (NSString *) stripTags:(NSString *)str { NSMutableString *ms = [NSMutableString stringWithCapacity:[str length]]; NSScanner *scanner = [NSScanner scannerWithString