ios 判断字符串首字符是否为字母

来源:互联网 发布:淘宝网广场舞长裤套装 编辑:程序博客网 时间:2024/06/02 05:57

判断字符串 首字符是否为字母

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

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

if ([predicate evaluateWithObject:aString]) {

 

}