Archived
1

Implemented Expression Evaluation/Parsing with Proper Error Handling

This commit is contained in:
Kim Wittenburg
2014-09-11 22:17:29 +02:00
parent f791213127
commit 245468a559
16 changed files with 670 additions and 330 deletions

View File

@@ -0,0 +1,21 @@
//
// NSRegularExpression+MPParsingAdditions.h
// MathPad
//
// Created by Kim Wittenburg on 09.09.14.
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//
#import <Foundation/Foundation.h>
#define MPStringRange(string) NSMakeRange(0, [string length])
#define MPStringRangeFrom(from, string) NSMakeRange(from, [string length]-from)
@interface NSRegularExpression (MPParsingAdditions)
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string;
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string fromIndex:(NSUInteger)start;
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string options:(NSMatchingOptions)options;
- (NSTextCheckingResult *)firstMatchInString:(NSString *)string options:(NSMatchingOptions)options fromIndex:(NSUInteger)start;
@end