I want to save all sound files in one array like .caf, .avi ,.mp3.. How can I check OR condition for this.I am confused about syntax.
#define kSoundFileExtension @"caf"
#define kSoundfileExtnesion @"mp3"
if ([fileName rangeOfString:kSoundFileExtension].location != NSNotFound) {
[self.soundFiles addObject:fileName];
}
This is for OR :
This is for AND :
In first case either of two needs to fulfill the condition and in second case both need to fulfill the condition.