Yes, format specifiers work with wrapper classes.
There is much more to output formatting. But the above is enough for most applications.
You may wish to review the following.