Formatting syntax for superscript and subscript

the superscript and sub script can be insert use font property
but is there any formatting syntax to convet string to superscript and subscript that is convenient for math symblo like the following

for example \u(123) can make 123 to subscript,so string ‘A\u(123)’ is like this

@dmw1 we highly recommend use the font property to format text as superscript and subscript.
To insert the Euler symbol you can use the ASCII code of it \u2107.

Can you please add a functional example on how are setting the 123 subscript using the notation \u(123).