3 This file is part of libmspstrings
4 Copyright © 2006-2007 Mikko Rasa
5 Distributed under the LGPL
14 Formatter::Formatter(const string &f):
22 Returns the result of the formatting operation. Will throw if not enough
23 values have been fed to the formatter.
25 const string &Formatter::str() const
28 throw format_error("Too few arguments for format");
34 Advances the pos iterator to the next conversion, adding literal characters to
35 the result. The iterator is left at the second character of the conversion
38 void Formatter::advance()
40 for(; pos!=fmt.end(); ++pos)
46 throw format_error("Malformed format string");
56 Reads the next conversion from the format string and returns a corresponding
59 Fmt Formatter::get_conversion()
62 throw format_error("Too many arguments for format");
64 string::iterator i = pos;
65 for(; i!=fmt.end(); ++i)
70 throw format_error("Malformed format string");