Is there actually any way to superscript any number? In my App I need to superscript the numbers from 0 to 24.
I know that with \u2070 for example I can display a superscripted 0, but in Unicode there aren’t all the numbers I need.
I just want to set a NSString to a number with an exponent, like 10^24. Is there any way to do this?
Is there actually any way to superscript any number? In my App I need
Share
They are scattered throughout the Unicode blocks:
\u2070is superscript 0\u00B9is superscript 1\u00B2is superscript 2\u00B3is superscript 3\u2074is superscript 4\u2075is superscript 5\u2076is superscript 6\u2077is superscript 7\u2078is superscript 8\u2079is superscript 9To put them altogether and make it easier to choose the digit, you can either use a
wchar_t[]type, or store them in a string:As an exercise you could create a method that formats an integer as a superscript string.