This stuff is general enough for lstrings

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35646 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2010-10-14 11:01:15 +00:00
parent a88e2efd53
commit 0978e91ecf
3 changed files with 16 additions and 10 deletions

View File

@ -1083,16 +1083,6 @@ FindAndReplaceOptions::FindAndReplaceOptions(docstring const & search, bool case
namespace { namespace {
/** Checks if the supplied character is lower-case */
static bool isLowerCase(char_type ch) {
return lowercase(ch) == ch;
}
/** Checks if the supplied character is upper-case */
static bool isUpperCase(char_type ch) {
return uppercase(ch) == ch;
}
/** Check if 'len' letters following cursor are all non-lowercase */ /** Check if 'len' letters following cursor are all non-lowercase */

View File

@ -432,6 +432,16 @@ char_type uppercase(char_type c)
} }
bool isLowerCase(char_type ch) {
return lowercase(ch) == ch;
}
bool isUpperCase(char_type ch) {
return uppercase(ch) == ch;
}
namespace { namespace {
// since we cannot use tolower and toupper directly in the // since we cannot use tolower and toupper directly in the

View File

@ -83,6 +83,12 @@ char_type lowercase(char_type c);
/// Does not depend on the locale. /// Does not depend on the locale.
char_type uppercase(char_type c); char_type uppercase(char_type c);
/// Checks if the supplied character is lower-case
bool isLowerCase(char_type ch);
/// Checks if the supplied character is upper-case
bool isUpperCase(char_type ch);
/// same as lowercase(), but ignores locale /// same as lowercase(), but ignores locale
std::string const ascii_lowercase(std::string const &); std::string const ascii_lowercase(std::string const &);
docstring const ascii_lowercase(docstring const &); docstring const ascii_lowercase(docstring const &);