I have heard of a LaTeX-command which provides font-dependent code selection in math mode, but I forgot the name of it and cannot find it – Here is what I mean:
\unknownCommand{display size code}{text size code}{script size code}{scriptscript size code}
so that one could write
$\unknownCommand{...}$ % => outputs "display size code"
$e^{\unknownCommand{...}}$ % => outputs "script size code"
Do you know what command it is?