Boost Format library
The format library provides a class for formatting arguments according
to a format-string, as does printf, but with two major differences
:
- format sends the arguments to an internal stream, and so is entirely
type-safe and naturally supports all user-defined types.
- The ellipsis (...) can not be used correctly in the strongly typed
context of format, and thus the function call with arbitrary arguments is
replaced by successive calls to an argument feeding
operator%
You can find more Details in :
- Documentation (HTML).
- Headers
- Sample programs
- The program sample_formats.cpp demonstrates
simple uses of format.
- sample_new_features.cpp
illustrates the few formatting features that were added to printf's
syntax such as simple positional directives, centered alignment, and
'tabulations'.
- sample_advanced.cpp
demonstrates uses of advanced features, like reusing, and modifying,
format objects, etc..
- And sample_userType.cpp shows the
behaviour of the format library on user-defined types.
Revised
02 December, 2006
Copyright © 2003 Samuel Krempp
Distributed under the Boost Software License, Version 1.0. (See
accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)