Index: src/utils/string_utils.hpp =================================================================== --- src/utils/string_utils.hpp (revision 3075) +++ src/utils/string_utils.hpp (working copy) @@ -74,29 +74,6 @@ std::vector split(const std::string& s, char c); // ------------------------------------------------------------------------ - /** Overloaded insert_values taking one value, see below for - * full docs. - * \param s String in which all %s or %d are replaced. - * \param v1 Value to replace. - */ - template - std::string insert_values(const std::string &s, const T1 &v1) - { - return insert_values(s, v1, "", ""); - } - // ------------------------------------------------------------------------ - /** Overloaded insert_values taking two values, see below for - * full docs. - * \param s String in which all %s or %d are replaced. - * \param v1,v2 Value(s) to replace all %s or %d with. - */ - template - std::string insert_values(const std::string &s, const T1 &v1, - const T2 &v2=0) - { - return insert_values(s, v1, v2, ""); - } - // ------------------------------------------------------------------------ /** Replaces the first %s or %d in the string with the first value * converted to a string), the 2nd %s or %d with the second value etc. * So this is basically a simplified s(n)printf replacement, but doesn't @@ -138,6 +115,31 @@ return new_string; } + // ------------------------------------------------------------------------ + /** Overloaded insert_values taking two values, see below for + * full docs. + * \param s String in which all %s or %d are replaced. + * \param v1,v2 Value(s) to replace all %s or %d with. + */ + template + std::string insert_values(const std::string &s, const T1 &v1, + const T2 &v2=0) + { + return insert_values(s, v1, v2, ""); + } + + // ------------------------------------------------------------------------ + /** Overloaded insert_values taking one value, see below for + * full docs. + * \param s String in which all %s or %d are replaced. + * \param v1 Value to replace. + */ + template + std::string insert_values(const std::string &s, const T1 &v1) + { + return insert_values(s, v1, "", ""); + } + } // namespace StringUtils #endif