(IOS)判断字符串首字符是否为字母

+(BOOL)JudgeString:(NSString *)string{

    NSString *regex =@"[A-Za-z]+";

    NSPredicate*predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",regex];

    return[predicate evaluateWithObject:string];

}

你可能感兴趣的:((IOS)判断字符串首字符是否为字母)