format() function
Merge pull request #486 from tzz/tzz/sprintf_formats

format() function