How to expand to wd0?
\def\contentWidth#1%
{%
\setbox0\hbox{#1}%
\wd0
}
% \contentWidth{ } %! Missing number, treated as zero.
% \vrule\hspace{\contentWidth{ }}hello %! Missing number, treated as zero.
% \the\contentWidth{ } %! You can't use `\setbox' after \the.
\def\contentWidth#1%
{%
\setbox0\hbox{#1}%
\wd0
}
% \contentWidth{ } %! Missing number, treated as zero.
% \vrule\hspace{\contentWidth{ }}hello %! Missing number, treated as zero.
% \the\contentWidth{ } %! You can't use `\setbox' after \the.