Is there any way I can include a superscript with NSString? For example, I want to write square feet, like this: foot2.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
In this particular case, there is in fact a single Unicode character that represents a small "2" written above the line. It is U+00B2 (Superscript Two).
You should be able to do something like:
NSString *aString = [NSString stringWithUTF8String:"foot\u00b2"];