我有一些存储UTF-16和UTF-32 unicode值的字符串:
NSMutableString *utf16String = [[NSMutableString alloc] init];
[utf16String setString: @"F000"]; //U+F000
NSMutableString *utf32String = [[NSMutableString alloc] init];
[utf32String setString: @"F0000"]; //U+F0000
我想将这些字符串转换为十六进制值的UTF16Char和UTF32Char,以获得与以下相同的结果:
UTF16Char utf16Char = 0xF000;
UTF32Char utf32Char = 0xF0000;
提前感谢您的帮助