]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.h
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / support / lstrings.h
index 2ebd774ff96157935f56e9d7744e6740737e271a..c9bc75a9a7779e62b0c2604e4ccb12f70175f59f 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "support/docstring.h"
 
-#include <cstring>
 #include <string>
 #include <vector>
 
@@ -36,17 +35,6 @@ int compare_ascii_no_case(std::string const & s, std::string const & s2);
 /// Compare \p s and \p s2, ignoring the case of ASCII characters only.
 int compare_ascii_no_case(docstring const & s, docstring const & s2);
 
-///
-inline
-int compare(char const * a, char const * b)
-{
-#ifndef CXX_GLOBAL_CSTD
-       return std::strcmp(a, b);
-#else
-       return strcmp(a, b);
-#endif
-}
-
 ///
 bool isStrInt(std::string const & str);
 
@@ -104,12 +92,12 @@ docstring const lowercase(docstring const & s);
 /// Does not depend on the locale.
 docstring const uppercase(docstring const & s);
 
-/// Does the string start with this prefix?
-bool prefixIs(docstring const &, char_type);
+/// Does str start with c?
+bool prefixIs(docstring const & str, char_type c);
 
-/// Does the std::string start with this prefix?
-bool prefixIs(std::string const &, std::string const &);
-bool prefixIs(docstring const &, docstring const &);
+/// Does str start with pre?
+bool prefixIs(std::string const & str, std::string const & pre);
+bool prefixIs(docstring const & str, docstring const & pre);
 
 /// Does the string end with this char?
 bool suffixIs(std::string const &, char);
@@ -164,6 +152,7 @@ docstring const token(docstring const & a, char_type delim, int n);
     \endcode
 */
 int tokenPos(std::string const & a, char delim, std::string const & tok);
+int tokenPos(docstring const & a, char_type delim, docstring const & tok);
 
 
 /// Substitute all \a oldchar with \a newchar
@@ -269,6 +258,18 @@ 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);
+
+
 } // namespace support
 } // namespace lyx