Home | History | Annotate | Download | only in base

Lines Matching refs:Character

106    * non-whitespace character; {@code null} otherwise. See comment in {@link
131 * @param string the non-null character sequence to look in
132 * @param chars a non-null character sequence containing the set of characters
135 * @param fromIndex the index of the first character to examine in the input
154 * struct if a use-case of very large character sets exists.
156 Set<Character> charSet = Collections.emptySet();
164 charSet = new HashSet<Character>();
196 * @param delims the delimiter characters. Each character in the
233 * @param delims the delimiter characters. Each character in the string
270 * (defined by Character.isWhitespace(char), in addition to the characters
283 if (Character.isWhitespace(ch)
311 * (defined by Character.isWhitespace(char), in addition to the characters
324 if (Character.isWhitespace(ch)
340 * @param delims the delimiter characters. Each character in the
527 * @param what character(s) to strip
672 * Finds the last index in str of a character not in the characters
675 * Returns -1 if no such character can be found.
823 * replaced by "maskChar" character.
945 if (f == 0) { // previous character was normal
949 character
953 } else if (f == 1) { // previous character was a backslash
965 // if the character is not special, backslash disappears
970 } else { // previous character was a quote
979 // string contents cannot end with a special character
990 static final Map<String, Character> ESCAPE_STRINGS;
991 static final Set<Character> HEX_LETTERS;
994 // HTML character entity references as defined in HTML 4
996 ESCAPE_STRINGS = new HashMap<String, Character>(252);
1251 HEX_LETTERS = new HashSet<Character>(12);
1292 * terminating character is needed - e.g., &lt$ would be unescaped, but
1308 // We found an escaped character. Start slow escaping from there.
1340 boolean isDigit = Character.isDigit(ch);
1352 if (!isDigit && !Character.isLetter(ch)) {
1368 } else if (Character.isDigit(ch)) {
1381 Character repl = ESCAPE_STRINGS.get(key);
1496 * If you seem to have trouble with character-encodings, maybe
1498 * to specify a character encoding for your javascript somewhere.
1516 codePoint = Character.codePointAt(plainText, i);
1517 charCount = Character.charCount(codePoint);
1561 * Helper for escapeStringBody, which decides whether to escape a character.
1572 // but it is safe to escape any character in JSON.
1585 * Returns a javascript representation of the character in a hex escaped
1594 if (Character.isSupplementaryCodePoint(codePoint)) {
1599 char[] surrogates = Character.toChars(codePoint);
1612 * Returns a javascript representation of the character in a hex escaped
1616 * @param ch The character to append.
1678 * @return the index of the first character in s
1687 "End-of-string after escape character in [" + s + "]");
1762 * The only invalid character sequence in a CDATA tag is "]]&gt;".
2097 * character " ".
2126 * CharMatcher#removeFrom(CharSequence)}; if it is a single character,
2146 // this character is matched
2166 * identified via {@link Character#isISOControl(char)}.
2174 * CharMatcher#removeFrom(CharSequence)}; if it is a single character,
2197 if (Character.isISOControl(c)) {
2198 // this character is matched
2232 * the middle of the character--it would be better to limit the reader than
2348 * Determines if a string contains what looks like an html character
2370 * Determines if a character is a Hebrew character.
2373 return Character.UnicodeBlock.HEBREW.equals(
2374 Character.UnicodeBlock.of(codePoint));
2394 private static final Set<Character.UnicodeBlock> CJK_BLOCKS;
2396 Set<Character.UnicodeBlock> set = new HashSet<Character.UnicodeBlock>();
2397 set.add(Character.UnicodeBlock.HANGUL_JAMO);
2398 set.add(Character.UnicodeBlock.CJK_RADICALS_SUPPLEMENT);
2399 set.add(Character.UnicodeBlock.KANGXI_RADICALS);
2400 set.add(Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION);
2401 set.add(Character.UnicodeBlock.HIRAGANA);
2402 set.add(Character.UnicodeBlock.KATAKANA);
2403 set.add(Character.UnicodeBlock.BOPOMOFO);
2404 set.add(Character.UnicodeBlock.HANGUL_COMPATIBILITY_JAMO);
2405 set.add(Character.UnicodeBlock.KANBUN);
2406 set.add(Character.UnicodeBlock.BOPOMOFO_EXTENDED);
2407 set.add(Character.UnicodeBlock.KATAKANA_PHONETIC_EXTENSIONS);
2408 set.add(Character.UnicodeBlock.ENCLOSED_CJK_LETTERS_AND_MONTHS);
2409 set.add(Character.UnicodeBlock.CJK_COMPATIBILITY);
2410 set.add(Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A);
2411 set.add(Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS);
2412 set.add(Character.UnicodeBlock.HANGUL_SYLLABLES);
2413 set.add(Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS);
2414 set.add(Character.UnicodeBlock.CJK_COMPATIBILITY_FORMS);
2415 set.add(Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS);
2416 set.add(Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B);
2417 set.add(Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT);
2422 * Determines if a character is a CJK ideograph or a character typically
2434 * Determines if a character is a CJK ideograph or a character typically
2443 return CJK_BLOCKS.contains(Character.UnicodeBlock.of(codePoint));
2464 * Returns the approximate display width of the character, measured
2470 * ranges for which it seems safe to assume that no character is
2471 * substantially wider than an ascii character:
2692 Character delimiter) {
2793 * first character converted to uppercase as by {@link String#toUpperCase()}.
2795 * its first character is non-alphabetic, if its first character is already
2806 * @param s the string whose first character is to be uppercased
2807 * @return a string equivalent to <tt>s</tt> with its first character
2816 char capitalized = Character.toUpperCase(first);
2926 * truncated before the last space character on or before
2951 if (Character.isSpaceChar(source.charAt(maxLength))) {
2957 if (Character.isSpaceChar(truncated.charAt(i))) {
2995 * Normalizes {@code index} such that it respects Unicode character
2998 * <p>If {@code index} is the low surrogate of a unicode character,
3009 * @return a normalized index that does not split a Unicode character
3013 if (Character.isHighSurrogate(str.charAt(index - 1)) &&
3014 Character.isLowSurrogate(str.charAt(index))) {
3022 * Returns a substring of {@code str} that respects Unicode character
3026 * as defined by {@link Character#isHighSurrogate} and
3027 * {@link Character#isLowSurrogate}.
3030 * character, it will be offset by -1.
3070 * True iff the given character needs to be escaped in a javascript string
3075 * <dt> \ <dd> the escape character
3113 * True iff the given character needs to be escaped in a JSON string literal.
3117 * <dt> \ <dd> the escape character
3177 .addCodePoint(Character.codePointAt("'", 0))
3178 .addCodePoint(Character.codePointAt("\"", 0))
3179 .addCodePoint(Character.codePointAt("&", 0))
3180 .addCodePoint(Character.codePointAt("<", 0))
3181 .addCodePoint(Character.codePointAt(">", 0))
3182 .addCodePoint(Character.codePointAt("=", 0))
3183 .addCodePoint(Character.codePointAt("\\", 0))
3187 .addCodePoint(Character.codePointAt("\"", 0))
3188 .addCodePoint(Character.codePointAt("\\", 0))