0

我有存储 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;

在此先感谢您的帮助

4

0 回答 0