1. 使用NsCompare 或者isEqualToNumber来实现NsNumber对象的比较。
NsCompare:比较大小关系
isEqualToNumber:是否相等
长度:[str length]
查找子串:
NSRange rr = [str rangeOfString:@”ll”];
If(rr.location == NSNotFound){
NSLog(@”ll is not in str ”);
}
else { NSLog(@”ll is in str”);}
时间: 2024-10-13 11:55:15