]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.h
lyxserver cleanup patch + andre's small patches
[lyx.git] / src / support / lstrings.h
index 1878476b2bbde65adb8167369960d19927726c60..e79d1f158c57c397cd875121c9e4e5751b003bdd 100644 (file)
@@ -16,7 +16,7 @@
 #pragma interface
 #endif
 
-#include <cstring>
+//#include <cstring>
 #include <cctype>
 
 #include "Lsstream.h"
@@ -27,6 +27,9 @@
 ///
 int compare_no_case(string const & s, string const & s2);
 
+///
+int compare_ascii_no_case(string const & s, string const & s2);
+
 ///
 int compare_no_case(string const & s, string const & s2, unsigned int len);
 
@@ -34,14 +37,22 @@ int compare_no_case(string const & s, string const & s2, unsigned int len);
 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 
 }
 
 ///
@@ -226,4 +237,7 @@ string const split(string const & a, char delim);
 /// Same as split but uses the last delim.
 string const rsplit(string const & a, string & piece, char delim);
 
+/// Escapes non ASCII chars
+string const escape(string const & lab);
+
 #endif