aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/CharacterSet.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-04-26 07:53:21 +1000
committerNeil <nyamatongwe@gmail.com>2019-04-26 07:53:21 +1000
commit94750763850b4cb8051a7ee155ca403322726e44 (patch)
treee36a8a5e01ac9723b9157611c49ff74f6576099c /lexlib/CharacterSet.h
parentb655ec9fbc090306549d632f27468a58211c3c60 (diff)
downloadscintilla-mirror-94750763850b4cb8051a7ee155ca403322726e44.tar.gz
Feature [feature-requests:#1238]. Simplify camel case forcing by checking only
for upper and lower case characters instead of current word characters. This changes behaviour for words like "_word" -> "_Word" instead of remaining "_word" but that doesn't matter for this feature's intended use which is to allow display of ASCII-only keywords in the user's preferred casing (else/ELSE/Else) for languages with case-insensitive keywords.
Diffstat (limited to 'lexlib/CharacterSet.h')
-rw-r--r--lexlib/CharacterSet.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lexlib/CharacterSet.h b/lexlib/CharacterSet.h
index 358f6bed3..0470e446c 100644
--- a/lexlib/CharacterSet.h
+++ b/lexlib/CharacterSet.h
@@ -135,6 +135,10 @@ inline bool IsUpperCase(int ch) {
return (ch >= 'A') && (ch <= 'Z');
}
+inline bool IsUpperOrLowerCase(int ch) {
+ return IsUpperCase(ch) || IsLowerCase(ch);
+}
+
inline bool IsAlphaNumeric(int ch) {
return
((ch >= '0') && (ch <= '9')) ||