NSMutableString*testString = [[NSMutableStringalloc]initWithString: nameStr];
if (CFStringTransform((__bridge CFMutableStringRef)testString, 0, kCFStringTransformMandarinLatin, NO)) {
NSLog(@"带音标: %@", testString);
}
if (CFStringTransform((__bridge CFMutableStringRef)testString, 0, kCFStringTransformStripDiacritics, NO)) {
NSLog(@"不带音标: %@", testString);
}
网友评论