Clamp string properly