Here, I take the definition of \hrulefill, and add height/width/depth specification to the \hrule, allowing it to be customized (I call it \myrulefill). Also, by avoiding an earlier suggested \raisebox, the text sits on the baseline.
\documentclass{article}
\def\dotfill#1{\cleaders\hbox to #1{.}\hfill}
\makeatletter
\def\myrulefill{\leavevmode\leaders\hrule height .7ex width 1ex depth -0.6ex\hfill\kern\z@}
\makeatother
\begin{document}
\noindent\myrulefill Short Text\myrulefill\par
\noindent\myrulefill This is Longer Text\myrulefill
\noindent\myrulefill What you see is very long text\myrulefill
\makeatletter
\def\myrulefill{\leavevmode\leaders\hrule height .9ex width 1ex depth -0.2ex\hfill\kern\z@}
\makeatother
\noindent\myrulefill Short Text\myrulefill\par
\noindent\myrulefill This is Longer Text\myrulefill
\noindent\myrulefill What you see is very long text\myrulefill
\end{document}

\noindent\hrulefill\raisebox{-.3\ht\strutbox}{Short Text}\hrulefill\par– Steven B. Segletes Jan 09 '17 at 20:27
– Dimitri Jan 09 '17 at 20:47\newcommand*{\lrrule}[1]{\hrulefill\hspace*{2.5mm}\raisebox{-.3\ht\strutbox}{#1}\hspace*{2.5mm}\hrulefill}