\RequirePackage{xspace}
\protected\def\stex{%
  \@ifundefined{texorpdfstring}{\raisebox{-.5ex}S\kern-.5ex\TeX}{%
    \texorpdfstring{\raisebox{-.5ex}S\kern-.5ex\TeX}{sTeX}\xspace%
  }%
}
\let\sTeX\stex