]> 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 bcf4b5aaca6990d2941cc438edce88192c83c2b0..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