mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8263677: Improve Character.isLowerCase/isUpperCase lookups
Reviewed-by: erikj, ihse, naoto, rriggs
This commit is contained in:
parent
b63b5d4c4b
commit
e152cc0312
8 changed files with 144 additions and 266 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -212,13 +212,11 @@ class CharacterData03 extends CharacterData {
|
|||
}
|
||||
|
||||
boolean isLowerCase(int ch) {
|
||||
return (getProperties(ch) & $$maskType) == Character.LOWERCASE_LETTER
|
||||
|| (getPropertiesEx(ch) & $$maskOtherLowercase) != 0;
|
||||
return (getPropertiesEx(ch) & $$maskOtherLowercase) != 0;
|
||||
}
|
||||
|
||||
boolean isUpperCase(int ch) {
|
||||
return (getProperties(ch) & $$maskType) == Character.UPPERCASE_LETTER
|
||||
|| (getPropertiesEx(ch) & $$maskOtherUppercase) != 0;
|
||||
return (getPropertiesEx(ch) & $$maskOtherUppercase) != 0;
|
||||
}
|
||||
|
||||
boolean isWhitespace(int ch) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue