Check part of String is present in NSString
Below is code snippet to check whether part of string is present in a provided NSString
NSString
*myString = @"This is an APPLE";
if ([
myString rangeOfString:@"APPLE"].location
!= NSNotFound)
{
NSLog(@"Found");
}
else
{
NSLog(@"Not Found");
}
Comments
Post a Comment