摘要: NSMutableSet *set1=[NSMutableSet set]; NSMutableSet *set2=[NSMutableSet setWithObjects:@"1",@"2", nil]; NSMutableSet *set3=[NSMutableSet setWith... 阅读全文
posted @ 2016-01-11 10:24 5个半柠檬C 阅读(135) 评论(0) 推荐(0) 编辑
摘要: NSSet *set=[NSSet set]; NSSet *set1=[NSSet setWithObjects:@"jack",@"rose", nil]; //存取数据的个数 NSInteger count=[set1 count]; NSLog(@"%ld",coun... 阅读全文
posted @ 2016-01-11 10:23 5个半柠檬C 阅读(101) 评论(0) 推荐(0) 编辑
摘要: //查找名字里面包含“王”的姓 NSArray *array = [[NSArray alloc]initWithObjects:@"小王",@"王力",@"李丽",@"方方", nil]; NSString *match = @"*王*"; //查找姓王的名字,王字必须为首... 阅读全文
posted @ 2016-01-11 10:20 5个半柠檬C 阅读(97) 评论(0) 推荐(0) 编辑
摘要: //查找名字里面包含“王”的姓 NSArray *array = [[NSArray alloc]initWithObjects:@"小王",@"王力",@"李丽",@"方方", nil]; NSString *match = @"*王*"; //查找姓王的名字,王字必须为首... 阅读全文
posted @ 2016-01-11 10:09 5个半柠檬C 阅读(114) 评论(0) 推荐(0) 编辑
摘要: //查询单词里面包含“ang”的字符串 NSArray *array = [[NSArray alloc]initWithObjects:@"beijing",@"shanghai",@"guangzou",@"wuhan", nil]; NSString *string = @"ang... 阅读全文
posted @ 2016-01-11 10:04 5个半柠檬C 阅读(85) 评论(0) 推荐(0) 编辑
摘要: /* 第6题 字符串内所有a都替换成A; */ NSString *str7=@"whatareyou"; str7=[str7 stringByReplacingOccurrencesOfString:@"a" withString:@"A"]; NSLog(@... 阅读全文
posted @ 2016-01-11 08:30 5个半柠檬C 阅读(481) 评论(0) 推荐(0) 编辑