- NSString *temp = @"english, french, japanese, chinese";
- NSString *jap = @"japanese";
- NSRange foundObj=[temp rangeOfString:jap options:NSCaseInsensitiveSearch];
- if(foundObj.length>0) {
- NSLog(@"Yes ! Jap found");
- } else {
- NSLog(@"Oops ! no jap");
- }
NSString 检查是否包含该字符
最新推荐文章于 2020-06-04 17:35:31 发布