34 lines
1.0 KiB
Objective-C
34 lines
1.0 KiB
Objective-C
//
|
|
// NSRegularExpression+MPParsingAdditions.m
|
|
// MathPad
|
|
//
|
|
// Created by Kim Wittenburg on 09.09.14.
|
|
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
|
|
//
|
|
|
|
#import "NSRegularExpression+MPParsingAdditions.h"
|
|
|
|
@implementation NSRegularExpression (MPParsingAdditions)
|
|
|
|
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string
|
|
{
|
|
return [self firstMatchInString:string options:0 range:MPStringRange(string)];
|
|
}
|
|
|
|
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string fromIndex:(NSUInteger)start
|
|
{
|
|
return [self firstMatchInString:string options:0 range:NSMakeRange(start, [string length]-start)];
|
|
}
|
|
|
|
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string options:(NSMatchingOptions)options
|
|
{
|
|
return [self firstMatchInString:string options:options range:MPStringRange(string)];
|
|
}
|
|
|
|
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string options:(NSMatchingOptions)options fromIndex:(NSUInteger)start
|
|
{
|
|
return [self firstMatchInString:string options:options range:NSMakeRange(start, [string length]-start)];
|
|
}
|
|
|
|
@end
|