Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding strings in superscript 3 [duplicate]

Following Code:

string a = "Adding substring" + "\xB2";
Console.Write(a);

Will give : "Adding substring2". 2 will be superscript as expected.

How can I do the same with number 3.

like image 693
someone Avatar asked Oct 17 '25 05:10

someone


2 Answers

Just replace 2 with 3 in "\xB2"

string a = "Adding substring" + "\xB3";
Console.Write(a);

And you will get:

Adding substring³
like image 180
Habib Avatar answered Oct 19 '25 21:10

Habib


The unicode character for superscript-3 is \xB3

like image 32
BlueRaja - Danny Pflughoeft Avatar answered Oct 19 '25 22:10

BlueRaja - Danny Pflughoeft



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!