Generate the whole output string in one swoop rather than printing by character.