We characterize the set of all functions $f$ of $\mathbb R$ to
itself such that the associated superposition operator $T_f: g \to f
\circ g$ maps the class $BV^1_p (\mathbb R)$ into itself.
Here $BV^1_p (\mathbb R)$, $1 \le p < \infty$, denotes the set of
primitives of functions of bounded $p$-variation, endowed with a
suitable norm. It turns out that such an operator is always bounded
and sublinear. Also, consequences for the boundedness of
superposition operators defined on Besov spaces $B^s_{p,q}({\mathbb
R}^n)$ are discussed.