//NSMutableString *ms=@"老王";
//将汉字转换为拼音
CFStringTransform((__bridge CFMutableStringRef)ms, 0, kCFStringTransformToLatin, NO);
//将拼音的声调去掉
CFStringTransform((__bridge CFMutableStringRef)ms, 0, kCFStringTransformStripDiacritics, NO);
//将字符串所有的字母大写
NSString *upStr=[ms uppercaseString];
//截取首字符
NSString *firstStr=[upStr substringToIndex:1];
网友评论