How to Get Unicode Value into a String Objective C -
I'm actually trying to get the unicode value of a letter, and put it in a escape string . I set the title of an NSButton to ±, now I am trying to get the title of this button and convert it to "\ U00B1";
For example
Aichaara the Kart = [The Batton Nightlight at Endx: 0]; // Now how will I change the top of the string like "@ \ \ u03b2"
There will be a solution:
unichar theChar = ... NSString * escapeCode = [NSString stringWithFormat: @ "\\\\ u% 04x", author];
Note that to get two in the string as a result, you need four backslashes.
Comments
Post a Comment