-string const getStringFromVector(std::vector<string> const & vec,
- string const & delim = ",");
-
-// wrapper around boost::format using one argument %1$s
-string bformat(string const & fmt, string const & arg1);
-// arguments %1$s and %2$s
-string bformat(string const & fmt, string const & arg1, string const & arg2);
-// arguments %1$d and %2$d
-string bformat(string const & fmt, int arg1, int arg2);
-// arguments %1$s and %2$s and %3$s
-string bformat(string const & fmt, string const & arg1, string const & arg2,
- string const & arg3);
-// arguments %1$s and %2$s and %3$s and %4$s
-string bformat(string const & fmt, string const & arg1, string const & arg2,
- string const & arg3, string const & arg4);
+std::string const getStringFromVector(std::vector<std::string> const & vec,
+ std::string const & delim = std::string(","));
+
+/// Search \p search_token in \p str and return the position if it is
+/// found, else -1. The last item in \p str must be "".
+int findToken(char const * const str[], std::string const & search_token);
+
+/// Convert internal line endings to line endings as expected by the OS
+docstring const externalLineEnding(docstring const & str);
+
+/// Convert line endings in any formnat to internal line endings
+docstring const internalLineEnding(docstring const & str);
+
+
+template <class Arg1>
+docstring bformat(docstring const & fmt, Arg1);
+
+template <class Arg1, class Arg2>
+docstring bformat(docstring const & fmt, Arg1, Arg2);
+
+template <class Arg1, class Arg2, class Arg3>
+docstring bformat(docstring const & fmt, Arg1, Arg2, Arg3);
+
+template <class Arg1, class Arg2, class Arg3, class Arg4>
+docstring bformat(docstring const & fmt, Arg1, Arg2, Arg3, Arg4);
+
+
+template<> docstring bformat(docstring const & fmt, int arg1);
+template<> docstring bformat(docstring const & fmt, long arg1);
+template<> docstring bformat(docstring const & fmt, unsigned int arg1);
+template<> docstring bformat(docstring const & fmt, docstring arg1);
+template<> docstring bformat(docstring const & fmt, char * arg1);
+template<> docstring bformat(docstring const & fmt, docstring arg1, docstring arg2);
+template<> docstring bformat(docstring const & fmt, char const * arg1, docstring arg2);
+template<> docstring bformat(docstring const & fmt, int arg1, int arg2);
+template<> docstring bformat(docstring const & fmt, docstring arg1, docstring arg2, docstring arg3);
+template<> docstring bformat(docstring const & fmt, docstring arg1, docstring arg2, docstring arg3, docstring arg4);
+