标签:
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 }
第一种是带声调的,第二种不带声调
标签:
原文地址:http://www.cnblogs.com/joezblog/p/5497720.html