\documentclass{minimal}
\usepackage[T1]{fontenc}
\usepackage{makebox}
\unitlength1mm
\begin{document}
|asdf|

|\makebox[20mm][l]{asdf}|

|\makebox[20mm][r]{asdf}|

|\makebox[20mm][c]{asdf}|

|asdfasdf|

|\makebox*{asdfasdf}[l]{asdf}|

|\makebox*{asdfasdf}{asdf}|

|\makebox*{asdfasdf}[r]{asdf}|


|\makebox(20,3)[r]{asdf}|

\end{document}