Create string streams only when needed to save CPU cycles.