我对 nsstring hasprefix 有问题
例如。我有这样的字符串
NSString *data= @"NZDIDR,NZDIDR,9571,9593,9571,IDR,2013-09-23 21:45:25.0,CUR",
if([clean hasPrefix:@"CUR"]||[clean hasPrefix:@"cur"]){
NSLog(@"yep! there is CUR");
}
else{
NSLog(@"no there is!");
}
结果应该是“是的!有 CUR”对吗?我的方法有这个错误吗?