I have a unicode hex value in an NSString - how do I output the character; here's what I have:
NSLog(@"U0001D000");
NSMutableString *hexString = [[NSMutableString alloc] initWithString:@"0001D000"];
[hexString insertString:@"\U" atIndex:0];
NSLog(@"%@", hexString);
The first NSLog outputs the character; the second just produces the output "U0001D000"
I've tried lots of combinations and am at a loss - for example, I tried
NSLog(@"U%@", hexString);
But this gives a complier error, as it is looking for a string of numbers after the U
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…