NSString *ni = @"你好";
NSMutableString *niHao = [ni mutableCopy];
//先转化为带声调的拼音
CFStringTransform((__bridge CFMutableStringRef)niHao, NULL, kCFStringTransformMandarinLatin, NO);
//去掉重音和变音符号
CFStringTransform((__bridge CFMutableStringRef)niHao, NULL, kCFStringTransformStripCombiningMarks, NO);
网友评论