标签:ios 汉字转拼音
NSMutableString *ms = [[NSMutableString alloc] initWithString:@"我是中国人"]; if (CFStringTransform((__bridge CFMutableStringRef)ms, 0, kCFStringTransformMandarinLatin, NO)) { NSLog(@"Pingying: %@", ms); // wǒ shì zhōng guó rén 带声调 } if (CFStringTransform((__bridge CFMutableStringRef)ms, 0, kCFStringTransformStripDiacritics, NO)) { NSLog(@"Pingying: %@", ms); // wo shi zhong guo ren 不带声调 }
标签:ios 汉字转拼音
原文地址:http://blog.csdn.net/vaercly/article/details/39056947