kCFStringTransformStripDiacritics 纯拼音
这里我写一个方法,将需要转换的字符串输入就行了
具体为
NSString *string = @"中文"; NSString *text = [self stringWithForChainese:string];
- (NSString *)stringWithForChainese:(NSString *)text { CFStringTransform((__bridge CFMutableStringRef)text, 0, kCFStringTransformStripDiacritics, NO); return text; }
原文地址:http://blog.csdn.net/u013243469/article/details/41649607