Also simplified implementation by better leveraging util/strformat.h. This is from pull request #12124, to get some testing for the fundamental change before freeze.