RosettaCodeData/Task/Regular-expressions/Objective-C/regular-expressions-2.m

5 lines
165 B
Mathematica
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
NSString *str = @"I am a string";
if ([str rangeOfString:@"string$" options:NSRegularExpressionSearch].location != NSNotFound) {
NSLog(@"Ends with 'string'");
}