http://mikestedman.blogspot.com/2008/10/c-string-formatting.html