in reply to Assigning printf to a variable

It sounds like you want sprintf.


🦛