]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.h
Embedding: merge lyx::EmbeddedFiles to lyx::support::EmbeddedFileList
[lyx.git] / src / support / lstrings.h
index 186f3cc948fc6ee9e29951134852c5b73b654075..381e818f763336286fa3d1836ad3980a90b9d0e7 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "support/docstring.h"
 
-#include <cstring>
+#include <string>
 #include <vector>
 
 
@@ -35,28 +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
-}
-
-///
-inline
-int compare(char const * a, char const * b, unsigned int len)
-{
-#ifndef CXX_GLOBAL_CSTD
-       return std::strncmp(a, b, len);
-#else
-       return strncmp(a, b, len);
-#endif
-}
-
 ///
 bool isStrInt(std::string const & str);
 
@@ -66,9 +44,9 @@ bool isStrUnsignedInt(std::string const & str);
 ///
 bool isStrDbl(std::string const & str);
 
-bool isHex(lyx::docstring const & str);
+bool isHex(docstring const & str);
 
-int hexToInt(lyx::docstring const & str);
+int hexToInt(docstring const & str);
 
 /// is \p str pure ascii?
 bool isAscii(docstring const & str);
@@ -279,6 +257,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