Skip to content

Instantly share code, notes, and snippets.

@zhangkn
Created May 14, 2018 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhangkn/476d3e5f94f7ab873de3f5d955e09687 to your computer and use it in GitHub Desktop.
Save zhangkn/476d3e5f94f7ab873de3f5d955e09687 to your computer and use it in GitHub Desktop.
//谓词技术的使用 evaluateWithObject
static BOOL knmathFile(NSString* file, NSString* reg) {
if (!reg)
return YES;
NSPredicate* predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",reg];
return [predicate evaluateWithObject:file];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment