< prev index next >

src/java.base/share/classes/java/util/regex/ASCII.java

Print this page
rev 56177 : [mq]: 8230365-Pattern-for-a-control-char-matches-non-control-characters

*** 1,7 **** /* ! * Copyright (c) 1999, 2000, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1999, 2019, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 257,266 **** --- 257,270 ---- static boolean isWord(int ch) { return isType(ch, WORD); } + static boolean isCntrlId(int ch) { + return ((ch-0x3f)|(0x5f-ch)) >= 0; + } + static int toDigit(int ch) { return (ctype[ch & 0x7F] & 0x3F); } static int toLower(int ch) {
< prev index next >