forked from samiamwork/Movist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CSRegex.h
44 lines (30 loc) · 1.02 KB
/
CSRegex.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// CSRegex.h
//
// http://www.cocoadev.com/index.pl?CSRegex
//
#import <Foundation/Foundation.h>
#import <regex.h>
@interface CSRegex : NSObject
{
regex_t preg;
}
-(id)initWithPattern:(NSString *)pattern options:(int)options;
-(void)dealloc;
-(BOOL)matchesString:(NSString *)string;
-(NSString *)matchedSubstringOfString:(NSString *)string;
-(NSArray *)capturedSubstringsOfString:(NSString *)string;
+(CSRegex *)regexWithPattern:(NSString *)pattern options:(int)options;
+(CSRegex *)regexWithPattern:(NSString *)pattern;
+(NSString *)null;
+(void)initialize;
@end
@interface NSString (CSRegex)
-(BOOL)matchedByPattern:(NSString *)pattern options:(int)options;
-(BOOL)matchedByPattern:(NSString *)pattern;
-(NSString *)substringMatchedByPattern:(NSString *)pattern options:(int)options;
-(NSString *)substringMatchedByPattern:(NSString *)pattern;
-(NSArray *)substringsCapturedByPattern:(NSString *)pattern options:(int)options;
-(NSArray *)substringsCapturedByPattern:(NSString *)pattern;
-(NSString *)escapedPattern;
@end