format() function

Does everything it's supposed to, with acceptance test and docs.

Only accepts `doxfs` specifiers right now.  Does not accept any of the dangerous modifiers.