NSString 객체가 있고 그것을 unichar로 변경하고 싶습니다.NSString을 unichar로 변환 할 수 있습니까?
int decimal = [[temp substringFromIndex:2] intValue]; // decimal = 12298
NSString *hex = [NSString stringWithFormat:@"0x%x", decimal]; // hex = 0x300a
NSString *chineseChar = [NSString stringWithFormat:@"%C", hex];
// This statement log a different Chinese char every time I run this code
NSLog(@"%@",chineseChar);
로그를 볼 때마다 코드를 실행할 때마다 다른 문자가 표시됩니다. m 뭔가 빠졌어요 ...?
감사합니다. –