我有这个NSString:
NSString *test = @"three is a number";
我想检查这个NSString是否以“三”开头
解决方法
尝试使用hasPrefix方法:
if([test hasPrefix:@"three"]) { // Begins with three }