Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 21 lines (15 sloc) 0.488 kb
6fa4925 @davedelong initial commit
authored
1 //
2 // NSExpression+EasyParsing.m
3 // DDMathParser
4 //
5 // Created by Dave DeLong on 11/18/10.
6 // Copyright 2010 Home. All rights reserved.
7 //
8
9 #import "NSExpression+EasyParsing.h"
10
11
12 @implementation NSExpression (EasyParsing)
13
14 + (NSExpression *) expressionWithString:(NSString *)string {
15 NSString * format = [NSString stringWithFormat:@"%@ = 0", string];
16 NSComparisonPredicate * p = (NSComparisonPredicate *)[NSPredicate predicateWithFormat:format];
17 return [p leftExpression];
18 }
19
20 @end
Something went wrong with that request. Please try again.