Here's my pseudo latex code to try and show what I'm trying to do in my memo latex class:
\newcommand\headername{%should be the @memoto, or if too long, an abbreviated subject
\ifthenelse{\lengthtest{\settowidth{\@memoto}>.45*\linewidth}}
{\emph{dummy text here}}
{\@memoto}
}
I'm probably missing some calculation package or other, but I'm looking for some kind of test to see if \@memoto is longer than 45% of the linewidth. How do I do this?
(ultimately I will use this latex class within LyX, but I hope this is general enough to be answered without regard to LyX)

*in.45\linewidth– Guido Feb 01 '13 at 04:48