String reduction