aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/CharacterSet.h
diff options
context:
space:
mode:
authornyamatongwe <unknown>2012-07-02 15:36:58 +1000
committernyamatongwe <unknown>2012-07-02 15:36:58 +1000
commitefef37574f047fc428b9de410bd8da30809671ed (patch)
treebb4f8645d1e392864852a8a10d5e7546411a20ca /lexlib/CharacterSet.h
parent4d2ebae708d1b3013805f1a71af51bb8eca09f93 (diff)
downloadscintilla-mirror-efef37574f047fc428b9de410bd8da30809671ed.tar.gz
Make IsLowerCase and IsUpperCase not depend on non-portable isascii, take
an int argument to match similar calls, and move to header for wider use.
Diffstat (limited to 'lexlib/CharacterSet.h')
-rw-r--r--lexlib/CharacterSet.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lexlib/CharacterSet.h b/lexlib/CharacterSet.h
index 23b5d68ea..a4234b5cc 100644
--- a/lexlib/CharacterSet.h
+++ b/lexlib/CharacterSet.h
@@ -93,6 +93,14 @@ inline bool IsASCII(int ch) {
return (ch >= 0) && (ch < 0x80);
}
+inline bool IsLowerCase(int ch) {
+ return (ch >= 'a') && (ch <= 'z');
+}
+
+inline bool IsUpperCase(int ch) {
+ return (ch >= 'A') && (ch <= 'Z');
+}
+
inline bool IsAlphaNumeric(int ch) {
return
((ch >= '0') && (ch <= '9')) ||