mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
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:
parent
a88e2efd53
commit
0978e91ecf
@ -1083,16 +1083,6 @@ FindAndReplaceOptions::FindAndReplaceOptions(docstring const & search, bool case
|
||||
|
||||
|
||||
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 */
|
||||
|
@ -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 {
|
||||
|
||||
// since we cannot use tolower and toupper directly in the
|
||||
|
@ -83,6 +83,12 @@ char_type lowercase(char_type c);
|
||||
/// Does not depend on the locale.
|
||||
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
|
||||
std::string const ascii_lowercase(std::string const &);
|
||||
docstring const ascii_lowercase(docstring const &);
|
||||
|
Loading…
Reference in New Issue
Block a user