Lines Matching defs:chars

133    * @param chars a non-null character sequence containing the set of characters
147 CharSequence string, CharSequence chars, int fromIndex) {
159 for (int i = 0; i < chars.length(); i++) {
160 char c = chars.charAt(i);
674 * in 'chars' (similar to ANSI string.find_last_not_of).
679 * instead for this: {@code CharMatcher.noneOf(chars).lastIndexIn(str)}.
683 public static int lastIndexNotOf(String str, String chars, int fromIndex) {
687 if (chars.indexOf(str.charAt(pos)) < 0) {
696 * Like String.replace() except that it accepts any number of old chars.
766 throw new IllegalArgumentException("string contains non-hex chars");
933 char chars[] = s.toCharArray();
936 if (chars.length < 2 || chars[0] != chars[chars.length - 1] ||
937 (chars[0] != '\'' && chars[0] != '"')) {
945 for (int i = 1; i < chars.length - 1; i++) {
947 if (chars[i] == '\\') {
949 } else if (chars[i] == chars[0]) {
952 chars[j++] = chars[i];
955 switch (chars[i]) {
956 case '0': chars[j++] = '\0'; break;
957 case '\'': chars[j++] = '\''; break;
958 case '"': chars[j++] = '"'; break;
959 case 'b': chars[j++] = '\b'; break;
960 case 'n': chars[j++] = '\n'; break;
961 case 'r': chars[j++] = '\r'; break;
962 case 't': chars[j++] = '\t'; break;
963 case 'z': chars[j++] = '\032'; break;
964 case '\\': chars[j++] = '\\'; break;
967 chars[j++] = chars[i];
973 if (chars[i] != chars[0]) {
976 chars[j++] = chars[0];
986 return new String(chars, 1, j - 1);
1310 char[] chars = s.toCharArray();
1311 char[] escaped = new char[chars.length];
1312 System.arraycopy(chars, 0, escaped, 0, index);
1317 for (int i = index; i < chars.length;) {
1318 if (chars[i] != '&') {
1319 escaped[pos++] = chars[i++];
1326 if (j < chars.length && chars[j] == '#') {
1333 if (j < chars.length && (chars[j] == 'x' || chars[j] == 'X')) {
1339 for (; j < chars.length; j++) {
1340 char ch = chars[j];
1359 if ((j <= chars.length && emulateBrowsers) ||
1360 (j < chars.length && chars[j] == ';')) {
1362 if (i + 2 < chars.length && s.charAt(i + 1) == '#') {
1368 new String(chars, i + 3, j - i - 3), 16);
1371 new String(chars, i + 2, j - i - 2));
1388 String key = new String(chars, i, j - i);
1396 if (j < chars.length && chars[j] == ';') {
1403 System.arraycopy(chars, i, escaped, pos, j - i);
1573 // If non-ASCII chars should be escaped, identify non-ASCII code points.
2130 * @param chars all of the characters to be considered for munge
2138 * chars}. In all cases you must first ensure that {@code str} is not
2142 String str, String chars, String replacement) {
2153 if (chars.indexOf(c) != -1) {
2156 // apparently a string of matched chars, so don't append anything
2172 * Returns a string with all sequences of ISO control chars (0x00 to 0x1F and
2176 * @param str the string you want to strip of ISO control chars
2192 * collapse() with an input String of control chars, because matching via
2208 // apparently a string of matched chars, so don't append anything