return a.find(b) != docstring::npos;
}
-///
+/// Returns true if the first argument is made of ascii chars given in the
+/// second argument.
bool containsOnly(std::string const &, std::string const &);
+///
+bool containsOnly(docstring const &, std::string const &);
/** Extracts a token from this string at the nth delim.
Doesn't modify the original string. Similar to strtok.
/// problems in latex labels.
docstring const escape(docstring const & lab);
+/// Group contents of an argument if needed
+docstring const protectArgument(docstring & arg, char const l = '[',
+ char const r = ']');
+
/// Truncates a string with an ellipsis at the end. Leaves str unchanged and
/// returns false if it is shorter than len. Otherwise resizes str to len, with
/// U+2026 HORIZONTAL ELLIPSIS at the end, and returns true.
std::string formatFPNumber(double);
-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, docstring arg1, int 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);
+docstring bformat(docstring const & fmt, int arg1);
+docstring bformat(docstring const & fmt, long arg1);
+#ifdef LYX_USE_LONG_LONG
+docstring bformat(docstring const & fmt, long long arg1);
+#endif
+docstring bformat(docstring const & fmt, unsigned int arg1);
+docstring bformat(docstring const & fmt, docstring const & arg1);
+docstring bformat(docstring const & fmt, char * arg1);
+docstring bformat(docstring const & fmt, docstring const & arg1, docstring const & arg2);
+docstring bformat(docstring const & fmt, docstring const & arg1, int arg2);
+docstring bformat(docstring const & fmt, char const * arg1, docstring const & arg2);
+docstring bformat(docstring const & fmt, int arg1, int arg2);
+docstring bformat(docstring const & fmt, docstring const & arg1, docstring const & arg2, docstring const & arg3);
+docstring bformat(docstring const & fmt, docstring const & arg1, docstring const & arg2, docstring const & arg3, docstring const & arg4);
} // namespace support