19 Apr 2017

To Check An Array contains a String (* caseInsensitive String (not as it is)) Or Not...


To Check An Array contains a String (* caseInsensitive String (not as it is)) Or Not...



              NSString* str;
              BOOL found = NO;
              for (str in [_skillsArray valueForKey:@"strValue"]) {
                if ([str caseInsensitiveCompare:tempStr] == NSOrderedSame) {
                       found = YES;
                        break;
                     }

                }



No comments:

Post a Comment

Recent Posts

Codable demo

Link: https://www.dropbox.com/s/kw7c1kgv1628bh7/codableDemo.zip?dl=0