The Casimir energy of a nonuniform string built up from two pieces with dif
ferent speeds of sound is calculated. A standard procedure of subtracting t
he energy of an infinite uniform string is applied, the subtraction being i
nterpreted as the renormalization of the string tension. It is shown that i
n the case of a homogeneous string this method is completely equivalent to
zeta renormalization.