Permalink
Browse files

Renamed - (NSString *)stringWithRegexPattern:(NSString*)pattern subst…

…itute:(NSString*)substitute to (NSString *)stringByRegex:(NSString*)pattern substitution:(NSString*)substitute;
  • Loading branch information...
1 parent 47e313c commit f71f83c0de68103751c250554dd32062fe73985c @artifacts committed Sep 26, 2008
Showing with 555 additions and 115 deletions.
  1. +1 −1 Classes/AFRegexString.h
  2. +1 −1 Classes/AFRegexString.m
  3. +2 −2 Classes/RegexViewController.m
  4. +493 −90 regex.xcodeproj/mic.pbxuser
  5. +58 −21 regex.xcodeproj/mic.perspectivev3
@@ -31,7 +31,7 @@
@interface NSString (AFRegex)
-- (NSString *)stringWithRegexPattern:(NSString*)pattern substitute:(NSString*)substitute;
+- (NSString *)stringByRegex:(NSString*)pattern substitution:(NSString*)substitute;
- (BOOL)matchesPattern:(NSString*)pattern;
- (BOOL)matchesPattern:(NSString*)pattern options:(int)options;
@@ -67,7 +67,7 @@ int rreplace (char *buf, int size, regex_t *re, char *rp)
@implementation NSString (AFRegex)
-- (NSString *)stringWithRegexPattern:(NSString*)pattern substitute:(NSString*)substitute
+- (NSString *)stringByRegex:(NSString*)pattern substitution:(NSString*)substitute
{
regex_t preg;
@@ -33,13 +33,13 @@ @implementation RegexViewController
- (void)viewWillAppear:(BOOL)animated
{
- self.output.text = [self.input.text stringWithRegexPattern:self.pattern.text substitute:self.substitute.text];
+ self.output.text = [self.input.text stringByRegex:self.pattern.text substitution:self.substitute.text];
}
- (void)textFieldDidEndEditing:(UITextField *)textField
{
@try {
- self.output.text = [self.input.text stringWithRegexPattern:self.pattern.text substitute:self.substitute.text];
+ self.output.text = [self.input.text stringByRegex:self.pattern.text substitution:self.substitute.text];
}
@catch (NSException *exception)
{
Oops, something went wrong.

0 comments on commit f71f83c

Please sign in to comment.