]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.h
Fix bug 3904
[lyx.git] / src / support / lstrings.h
index 77b4ee5c3c620eb0bf3c50eb101abea7e2c82b12..7a0cbd5b5f16df85954765b7bde4250cc0f6619b 100644 (file)
 namespace lyx {
 namespace support {
 
-/// Compare \p s and \p s2, ignoring the case.
-/// Caution: Depends on the locale
-int compare_no_case(std::string const & s, std::string const & s2);
-
 /// Compare \p s and \p s2, ignoring the case.
 /// Does not depend on the locale.
 int compare_no_case(docstring const & s, docstring const & s2);
@@ -38,10 +34,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);
 
-/// Compare the first \p len characters of \p s and \p s2, ignoring the case.
-/// Caution: Depends on the locale
-int compare_no_case(std::string const & s, std::string const & s2, unsigned int len);
-
 ///
 inline
 int compare(char const * a, char const * b)
@@ -80,12 +72,22 @@ int hexToInt(lyx::docstring const & str);
 /// is \p str pure ascii?
 bool isAscii(docstring const & str);
 
-/// Changes the case of \p c to lowercase.
-/// Caution: Depends on the locale
+/**
+ * Changes the case of \p c to lowercase.
+ * Don't use this for non-ASCII characters, since it depends on the locale.
+ * This overloaded function is only implemented because the char_type variant
+ * would be used otherwise, and we assert in this function that \p c is in
+ * the ASCII range.
+ */
 char lowercase(char c);
 
-/// Changes the case of \p c to uppercase.
-/// Caution: Depends on the locale
+/**
+ * Changes the case of \p c to uppercase.
+ * Don't use this for non-ASCII characters, since it depends on the locale.
+ * This overloaded function is only implemented because the char_type variant
+ * would be used otherwise, and we assert in this function that \p c is in
+ * the ASCII range.
+ */
 char uppercase(char c);
 
 /// Changes the case of \p c to lowercase.
@@ -100,17 +102,13 @@ char_type uppercase(char_type c);
 std::string const ascii_lowercase(std::string const &);
 docstring const ascii_lowercase(docstring const &);
 
-/// Changes the case of \p s to lowercase.
-/// Caution: Depends on the locale
-std::string const lowercase(std::string const & s);
-
 /// Changes the case of \p s to lowercase.
 /// Does not depend on the locale.
 docstring const lowercase(docstring const & s);
 
 /// Changes the case of \p s to uppercase.
-/// Caution: Depends on the locale
-std::string const uppercase(std::string 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);