//
//  NSString+StringByStrippingHTML.m
//  SDFeedParser-Demo
//
//  Created by Peter Foti on 9/4/14.
//  Copyright (c) 2014 Sebastian Dobrincu. All rights reserved.
//

#import "NSString+StringByStrippingHTML.h"

@implementation NSString (StringByStrippingHTML)

+ (NSString *)stringByStrippingHTML:(NSString *)string {
    NSRange r;
    NSString *s = string;
    while ((r = [s rangeOfString:@"<[^>]+>" options:NSRegularExpressionSearch]).location != NSNotFound)
        s = [s stringByReplacingCharactersInRange:r withString:@""];
    return s;
}

@end
