namespace lyx {
-using support::lowercase;
+using support::compare_no_case;
using support::uppercase;
using support::split;
// string search and select next occurance and return
docstring const & str1 = searchstr;
docstring const str2 = bv->cursor().selectionAsString(false);
- if ((cs && str1 != str2) || lowercase(str1) != lowercase(str2)) {
+ if ((cs && str1 != str2) || compare_no_case(str1, str2) != 0) {
find(bv, searchstr, cs, mw, fw);
return false;
}
/// 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.