Format a String in C++ with the same convenience as String.format() in Java 5 / 6? -


is there common function available able sprintf type string formatting without having supply fixed size buffer, returns string class instance?

i know stringstream doesn't want, i don't want hard code position of tokens in output statement requires.

i want able define pattern sprintf lets you, without c baggage , in more idiomatic object oriented c++ manner.

maybe function sprintf using stringstream , produces string object? along line of convenience of string.format() in java or equivalent string formatting syntax in python.

the boost format library:

the <boost/format.hpp> format class provides printf-like formatting, in type-safe manner allows output of user-defined types.


Comments

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -