Implementing sprintf in nqp