/libcore/benchmarks/src/benchmarks/regression/ |
D | CharacterBenchmark.java | 62 for (int ch = 0; ch < 65536; ++ch) { in timeIsSpace() 63 dummy ^= ((char) ch == ' '); in timeIsSpace() 68 for (int ch = 0; ch < 65536; ++ch) { in timeIsSpace() 69 dummy ^= (ch == ' '); in timeIsSpace() 79 for (int ch = 0; ch < 65536; ++ch) { in timeDigit() 80 Character.digit(chars[ch], 10); in timeDigit() 85 for (int ch = 0; ch < 65536; ++ch) { in timeDigit() 86 Character.digit((int) chars[ch], 10); in timeDigit() 95 for (int ch = 0; ch < 65536; ++ch) { in timeGetNumericValue() 96 Character.getNumericValue(chars[ch]); in timeGetNumericValue() [all …]
|
/libcore/luni/src/main/java/javax/xml/parsers/ |
D | FilePathToURI.java | 43 char ch; 45 ch = escChs[i]; 46 gNeedEscaping[ch] = true; 47 gAfterEscaping1[ch] = gHexChs[ch >> 4]; 48 gAfterEscaping2[ch] = gHexChs[ch & 0xf]; 63 int len = path.length(), ch; in filepath2URI() local 68 ch = Character.toUpperCase(path.charAt(0)); in filepath2URI() 69 if (ch >= 'A' && ch <= 'Z') { in filepath2URI() 77 ch = path.charAt(i); in filepath2URI() 79 if (ch >= 128) in filepath2URI() [all …]
|
/libcore/luni/src/main/java/javax/xml/transform/stream/ |
D | FilePathToURI.java | 43 char ch; 45 ch = escChs[i]; 46 gNeedEscaping[ch] = true; 47 gAfterEscaping1[ch] = gHexChs[ch >> 4]; 48 gAfterEscaping2[ch] = gHexChs[ch & 0xf]; 63 int len = path.length(), ch; in filepath2URI() local 68 ch = Character.toUpperCase(path.charAt(0)); in filepath2URI() 69 if (ch >= 'A' && ch <= 'Z') { in filepath2URI() 77 ch = path.charAt(i); in filepath2URI() 79 if (ch >= 128) in filepath2URI() [all …]
|
/libcore/luni/src/main/java/java/lang/ |
D | CaseMapper.java | 58 char ch = value[i]; in toLowerCase() local 60 if (ch == LATIN_CAPITAL_I_WITH_DOT || Character.isHighSurrogate(ch)) { in toLowerCase() 63 } else if (ch == GREEK_CAPITAL_SIGMA && isFinalSigma(value, offset, count, i)) { in toLowerCase() 66 newCh = Character.toLowerCase(ch); in toLowerCase() 68 if (newValue == null && ch != newCh) { in toLowerCase() 112 private static int upperIndex(int ch) { in upperIndex() argument 114 if (ch >= 0xdf) { in upperIndex() 115 if (ch <= 0x587) { in upperIndex() 116 switch (ch) { in upperIndex() 124 } else if (ch >= 0x1e96) { in upperIndex() [all …]
|
/libcore/dex/src/main/java/com/android/dex/ |
D | Mutf8.java | 70 char ch = s.charAt(i); in countBytes() local 71 if (ch != 0 && ch <= 127) { // U+0000 uses two bytes. in countBytes() 73 } else if (ch <= 2047) { in countBytes() 92 char ch = s.charAt(i); in encode() local 93 if (ch != 0 && ch <= 127) { // U+0000 uses two bytes. in encode() 94 dst[offset++] = (byte) ch; in encode() 95 } else if (ch <= 2047) { in encode() 96 dst[offset++] = (byte) (0xc0 | (0x1f & (ch >> 6))); in encode() 97 dst[offset++] = (byte) (0x80 | (0x3f & ch)); in encode() 99 dst[offset++] = (byte) (0xe0 | (0x0f & (ch >> 12))); in encode() [all …]
|
/libcore/luni/src/main/java/java/nio/charset/ |
D | ModifiedUtf8.java | 77 char ch = s.charAt(i); in countBytes() local 78 if (ch != 0 && ch <= 127) { // U+0000 uses two bytes. in countBytes() 80 } else if (ch <= 2047) { in countBytes() 99 char ch = s.charAt(i); in encode() local 100 if (ch != 0 && ch <= 127) { // U+0000 uses two bytes. in encode() 101 dst[offset++] = (byte) ch; in encode() 102 } else if (ch <= 2047) { in encode() 103 dst[offset++] = (byte) (0xc0 | (0x1f & (ch >> 6))); in encode() 104 dst[offset++] = (byte) (0x80 | (0x3f & ch)); in encode() 106 dst[offset++] = (byte) (0xe0 | (0x0f & (ch >> 12))); in encode() [all …]
|
D | Charsets.java | 52 char ch = chars[i]; in toBigEndianUtf16Bytes() local 53 result[resultIndex++] = (byte) (ch >> 8); in toBigEndianUtf16Bytes() 54 result[resultIndex++] = (byte) ch; in toBigEndianUtf16Bytes()
|
/libcore/luni/src/main/java/org/apache/harmony/security/x501/ |
D | AttributeValue.java | 124 char ch = str.charAt(i); in isPrintableString() local 125 if (!(ch == 0x20 in isPrintableString() 126 || ch >= 0x27 && ch<= 0x29 // '() in isPrintableString() 127 || ch >= 0x2B && ch<= 0x3A // +,-./0-9: in isPrintableString() 128 || ch == '=' in isPrintableString() 129 || ch == '?' in isPrintableString() 130 || ch >= 'A' && ch<= 'Z' in isPrintableString() 131 || ch >= 'a' && ch<= 'z')) { in isPrintableString() 220 char ch = name.charAt(index); in makeEscaped() local 221 switch (ch) { in makeEscaped() [all …]
|
/libcore/luni/src/main/native/ |
D | java_nio_charset_Charsets.cpp | 123 jchar ch = static_cast<jchar>(*src++ & 0xff); in Charsets_asciiBytesToChars() local 124 *dst++ = (ch <= 0x7f) ? ch : REPLACEMENT_CHAR; in Charsets_asciiBytesToChars() 165 jchar ch = *src++; in charsToBytes() local 166 if (ch > maxValidChar) { in charsToBytes() 167 ch = '?'; in charsToBytes() 169 *dst++ = static_cast<jbyte>(ch); in charsToBytes() 196 jint ch = chars[i]; in Charsets_toUtf8Bytes() local 197 if (ch < 0x80) { in Charsets_toUtf8Bytes() 199 if (!out.append(ch)) { in Charsets_toUtf8Bytes() 202 } else if (ch < 0x800) { in Charsets_toUtf8Bytes() [all …]
|
/libcore/luni/src/main/java/java/io/ |
D | LineNumberReader.java | 117 int ch = super.read(); in read() local 118 if (ch == '\n' && lastWasCR) { in read() 119 ch = super.read(); in read() 122 switch (ch) { in read() 124 ch = '\n'; in read() 130 return ch; in read() 155 char ch = buffer[offset + i]; in read() local 156 if (ch == '\r') { in read() 159 } else if (ch == '\n') { in read()
|
D | BufferedReader.java | 253 int ch = readChar(); in read() local 254 if (lastWasCR && ch == '\n') { in read() 255 ch = readChar(); in read() 258 return ch; in read() 383 char ch = buf[i]; in readLine() local 384 if (ch == '\n' || ch == '\r') { in readLine() 387 lastWasCR = (ch == '\r'); in readLine() 404 char ch = buf[i]; in readLine() local 405 if (ch == '\n' || ch == '\r') { in readLine() 408 lastWasCR = (ch == '\r'); in readLine()
|
D | StreamTokenizer.java | 209 public void commentChar(int ch) { in commentChar() argument 210 if (ch >= 0 && ch < tokenTypes.length) { in commentChar() 211 tokenTypes[ch] = TOKEN_COMMENT; in commentChar() 492 public void ordinaryChar(int ch) { in ordinaryChar() argument 493 if (ch >= 0 && ch < tokenTypes.length) { in ordinaryChar() 494 tokenTypes[ch] = 0; in ordinaryChar() 547 public void quoteChar(int ch) { in quoteChar() argument 548 if (ch >= 0 && ch < tokenTypes.length) { in quoteChar() 549 tokenTypes[ch] = TOKEN_QUOTE; in quoteChar()
|
/libcore/luni/src/main/java/libcore/net/ |
D | UriCodec.java | 45 char ch = uri.charAt(i); in validate() local 46 if ((ch >= 'a' && ch <= 'z') in validate() 47 || (ch >= 'A' && ch <= 'Z') in validate() 48 || (ch >= '0' && ch <= '9') in validate() 49 || isRetained(ch)) { in validate() 51 } else if (ch == '%') { in validate() 76 char ch = s.charAt(i); in validateSimple() local 77 if (!((ch >= 'a' && ch <= 'z') in validateSimple() 78 || (ch >= 'A' && ch <= 'Z') in validateSimple() 79 || (ch >= '0' && ch <= '9') in validateSimple() [all …]
|
/libcore/luni/src/main/java/java/text/ |
D | Format.java | 182 char ch = string.charAt(index++); in upTo() local 183 if (ch == '\'') { in upTo() 189 } else if (ch == stop && !quote) { in upTo() 194 buffer.append(ch); in upTo() 206 char ch = string.charAt(index++); in upToWithQuotes() local 207 if (ch == '\'') { in upToWithQuotes() 211 if (ch == stop) { in upToWithQuotes() 218 if (ch == start) { in upToWithQuotes() 222 buffer.append(ch); in upToWithQuotes()
|
D | MessageFormat.java | 402 char ch; in applyPattern() local 403 while ((ch = template.charAt(offset++)) != '}' && ch != ',') { in applyPattern() 404 if (ch < '0' && ch > '9') { in applyPattern() 408 arg = arg * 10 + (ch - '0'); in applyPattern() 947 char ch; in match() local 949 && ((ch = string.charAt(offset)) == '}' || (!last && ch == ','))) { in match() 958 char ch; in parseVariable() local 959 if (offset >= length || ((ch = string.charAt(offset++)) != '}' && ch != ',')) { in parseVariable() 963 if (ch == '}') { in parseVariable() 972 ch = string.charAt(position.getIndex() - 1); in parseVariable() [all …]
|
/libcore/benchmarks/src/benchmarks/ |
D | StringIterationBenchmark.java | 30 char ch; in timeStringIteration0() local 32 ch = s.charAt(i); in timeStringIteration0() 39 char ch; in timeStringIteration1() local 41 ch = s.charAt(i); in timeStringIteration1() 48 char ch; in timeStringIteration2() local 51 ch = chars[i]; in timeStringIteration2()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/callback/ |
D | CallbackHandlerTest.java | 35 CallbackHandlerImpl ch = new CallbackHandlerImpl(); in test_CallbackHandler() local 36 assertFalse(ch.called); in test_CallbackHandler() 37 ch.handle(null); in test_CallbackHandler() 38 assertTrue(ch.called); in test_CallbackHandler()
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | Types.java | 142 char ch = as[len].charAt(0); in appendGenericType() local 143 if (ch == 'I') { in appendGenericType() 145 } else if (ch == 'B') { in appendGenericType() 147 } else if (ch == 'J') { in appendGenericType() 149 } else if (ch == 'F') { in appendGenericType() 151 } else if (ch == 'D') { in appendGenericType() 153 } else if (ch == 'S') { in appendGenericType() 155 } else if (ch == 'C') { in appendGenericType() 157 } else if (ch == 'Z') { in appendGenericType() 159 } else if (ch == 'V') { in appendGenericType()
|
/libcore/luni/src/main/java/java/util/regex/ |
D | Splitter.java | 45 char ch = re.charAt(0); in fastSplit() local 46 if (len == 1 && METACHARACTERS.indexOf(ch) == -1) { in fastSplit() 48 } else if (len == 2 && ch == '\\') { in fastSplit() 51 ch = re.charAt(1); in fastSplit() 52 if (METACHARACTERS.indexOf(ch) == -1) { in fastSplit() 71 while (separatorCount + 1 != limit && (end = input.indexOf(ch, begin)) != -1) { in fastSplit() 85 } while (input.charAt(begin - 1) == ch); in fastSplit() 95 end = input.indexOf(ch, begin); in fastSplit()
|
/libcore/luni/src/main/java/java/util/jar/ |
D | Attributes.java | 155 char ch = name.charAt(i); in Name() local 156 if (!((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') in Name() 157 || ch == '_' || ch == '-' || (ch >= '0' && ch <= '9'))) { in Name()
|
/libcore/luni/src/main/java/libcore/icu/ |
D | ICU.java | 299 char ch = pattern.charAt(i); in getDateFormatOrder() local 300 if (ch == 'd' || ch == 'L' || ch == 'M' || ch == 'y') { in getDateFormatOrder() 301 if (ch == 'd' && !sawDay) { in getDateFormatOrder() 304 } else if ((ch == 'L' || ch == 'M') && !sawMonth) { in getDateFormatOrder() 307 } else if ((ch == 'y') && !sawYear) { in getDateFormatOrder() 311 } else if (ch == 'G') { in getDateFormatOrder() 313 } else if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) { in getDateFormatOrder() 314 throw new IllegalArgumentException("Bad pattern character '" + ch + "' in " + pattern); in getDateFormatOrder() 315 } else if (ch == '\'') { in getDateFormatOrder()
|
/libcore/luni/src/main/java/org/apache/harmony/security/x509/ |
D | GeneralName.java | 567 char ch = string.charAt(i); in checkDNS() local 569 if ((ch > 'z' || ch < 'a') && (ch < '0' || ch > '9') && (ch != '*')) { in checkDNS() 575 if (!((ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') in checkDNS() 576 || (ch == '-') || (ch == '.') || (ch == '*'))) { in checkDNS() 579 if (ch == '.') { in checkDNS() 623 char ch = oid.charAt(i); in oidStrToInts() local 624 if ((ch < '0') || (ch > '9')) { in oidStrToInts() 627 value = 10 * value + (ch - '0'); in oidStrToInts() 637 char ch = oid.charAt(i); in oidStrToInts() local 638 if (ch != '.') { in oidStrToInts()
|
/libcore/xml/src/main/java/org/kxml2/io/ |
D | KXmlSerializer.java | 147 private static void reportInvalidCharacter(char ch) { in reportInvalidCharacter() argument 148 … throw new IllegalArgumentException("Illegal character (U+" + Integer.toHexString((int) ch) + ")"); in reportInvalidCharacter() 557 char ch = data.charAt(i); in cdsect() local 558 boolean allowedInCdata = (ch >= 0x20 && ch <= 0xd7ff) || in cdsect() 559 (ch == '\t' || ch == '\n' || ch == '\r') || in cdsect() 560 (ch >= 0xe000 && ch <= 0xfffd); in cdsect() 562 writer.write(ch); in cdsect() 563 } else if (Character.isHighSurrogate(ch) && i < data.length() - 1) { in cdsect() 566 writeSurrogate(ch, data.charAt(++i)); in cdsect() 569 reportInvalidCharacter(ch); in cdsect()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/support/ |
D | MockHandler.java | 45 public void characters(char[] ch, int start, int length) throws SAXException { in characters() argument 46 logger.add("characters", ch, start, length); in characters() 73 public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { in ignorableWhitespace() argument 74 logger.add("ignorableWhitespace", ch, start, length); in ignorableWhitespace() 119 public void comment(char[] ch, int start, int length) throws SAXException { in comment() argument 120 logger.add("comment", ch, start, length); in comment()
|
/libcore/luni/src/main/java/java/math/ |
D | BigInt.java | 128 char ch = s.charAt(0); in checkString() local 129 if (ch == '+') { in checkString() 133 } else if (ch == '-') { in checkString() 142 char ch = s.charAt(i); in checkString() local 143 if (Character.digit(ch, base) == -1) { in checkString() 146 if (ch > 128) { in checkString() 160 char ch = s.charAt(i); in toAscii() local 161 int value = Character.digit(ch, base); in toAscii() 163 ch = (char) ('0' + value); in toAscii() 165 result.append(ch); in toAscii()
|