Home | History | Annotate | Download | only in lang

Lines Matching refs:ch

68  *      boolean isJavaIdentifierPart(char ch).
2138 * @param ch code point to be tested
2141 public static UnicodeBlock of(int ch)
2143 if (ch > MAX_VALUE) {
2148 UCharacterProperty.INSTANCE.getIntPropertyValue(ch, UProperty.BLOCK));
3181 * <li>ch is a decimal digit or one of the european letters, and
3182 * <li>the value of ch is less than the specified radix.
3184 * @param ch the code point to query
3190 public static int digit(int ch, int radix)
3193 int value = digit(ch);
3195 // ch is not a decimal digit, try latin letters
3196 value = UCharacterProperty.getEuropeanDigit(ch);
3211 * @param ch the code point to query
3216 public static int digit(int ch)
3218 return UCharacterProperty.INSTANCE.digit(ch);
3229 * @param ch the code point to query
3234 ch)
3236 return UCharacterProperty.INSTANCE.getNumericValue(ch);
3248 * return type int and returns -1 when the argument ch does not have a
3252 * @param ch Code point to get the numeric value for.
3253 * @return numeric value of ch, or NO_NUMERIC_VALUE if none is defined.
3255 public static double getUnicodeNumericValue(int ch)
3257 return UCharacterProperty.INSTANCE.getUnicodeNumericValue(ch);
3264 * @param ch the code point
3271 public static boolean isSpace(int ch) {
3272 return ch <= 0x20 &&
3273 (ch == 0x20 || ch == 0x09 || ch == 0x0a || ch == 0x0c || ch == 0x0d);
3287 * @param ch code point whose type is to be determined
3290 public static int getType(int ch)
3292 return UCharacterProperty.INSTANCE.getType(ch);
3301 * @param ch code point to be determined if it is defined in the most
3305 public static boolean isDefined(int ch)
3307 return getType(ch) != 0;
3318 * @param ch code point to query
3321 public static boolean isDigit(int ch)
3323 return getType(ch) == UCharacterCategory.DECIMAL_DIGIT_NUMBER;
3332 * @param ch code point to determine if it is an ISO control character
3335 public static boolean isISOControl(int ch)
3337 return ch >= 0 && ch <= APPLICATION_PROGRAM_COMMAND_ &&
3338 ((ch <= UNIT_SEPARATOR_) || (ch >= DELETE_));
3344 * @param ch code point to determine if it is a letter
3347 public static boolean isLetter(int ch)
3350 return ((1 << getType(ch))
3362 * @param ch code point to determine if it is a letter or a digit
3365 public static boolean isLetterOrDigit(int ch)
3367 return ((1 << getType(ch))
3435 * @param ch code point to determine if it is in lowercase
3438 public static boolean isLowerCase(int ch)
3441 return getType(ch) == UCharacterCategory.LOWERCASE_LETTER;
3469 * @param ch code point to determine if it is a white space
3472 public static boolean isWhitespace(int ch)
3476 return ((1 << getType(ch)) &
3480 && (ch != NO_BREAK_SPACE_) && (ch != FIGURE_SPACE_) && (ch != NARROW_NO_BREAK_SPACE_)
3483 || (ch >= 0x9 && ch <= 0xd) || (ch >= 0x1c && ch <= 0x1f);
3490 * @param ch code point to determine if it is a space
3493 public static boolean isSpaceChar(int ch)
3496 return ((1 << getType(ch)) & ((1 << UCharacterCategory.SPACE_SEPARATOR)
3511 * @param ch code point to determine if it is in title case
3514 public static boolean isTitleCase(int ch)
3517 return getType(ch) == UCharacterCategory.TITLECASE_LETTER;
3541 * @param ch code point to determine if is can be part of a Unicode
3546 public static boolean isUnicodeIdentifierPart(int ch)
3550 return ((1 << getType(ch))
3561 || isIdentifierIgnorable(ch);
3579 * @param ch code point to determine if it can start a Unicode identifier
3583 public static boolean isUnicodeIdentifierStart(int ch)
3585 /*int cat = getType(ch);*/
3587 return ((1 << getType(ch))
3606 * @param ch code point to be determined if it can be ignored in a Unicode
3610 public static boolean isIdentifierIgnorable(int ch)
3614 if (ch <= 0x9f) {
3615 return isISOControl(ch)
3616 && !((ch >= 0x9 && ch <= 0xd)
3617 || (ch >= 0x1c && ch <= 0x1f));
3619 return getType(ch) == UCharacterCategory.FORMAT;
3635 * @param ch code point to determine if it is in uppercase
3638 public static boolean isUpperCase(int ch)
3641 return getType(ch) == UCharacterCategory.UPPERCASE_LETTER;
3659 * @param ch code point whose lowercase equivalent is to be retrieved
3662 public static int toLowerCase(int ch) {
3663 return UCaseProps.INSTANCE.tolower(ch);
3673 * @param ch code point
3677 public static String toString(int ch)
3679 if (ch < MIN_VALUE || ch > MAX_VALUE) {
3683 if (ch < SUPPLEMENTARY_MIN_VALUE) {
3684 return String.valueOf((char)ch);
3687 return new String(Character.toChars(ch));
3706 * @param ch code point whose title case is to be retrieved
3709 public static int toTitleCase(int ch) {
3710 return UCaseProps.INSTANCE.totitle(ch);
3728 * @param ch code point whose uppercase is to be retrieved
3731 public static int toUpperCase(int ch) {
3732 return UCaseProps.INSTANCE.toupper(ch);
3741 * @param ch code point to be determined if it is in the supplementary
3745 public static boolean isSupplementary(int ch)
3747 return ch >= UCharacter.SUPPLEMENTARY_MIN_VALUE &&
3748 ch <= UCharacter.MAX_VALUE;
3753 * @param ch code point to be determined if it is not a supplementary
3757 public static boolean isBMP(int ch)
3759 return (ch >= 0 && ch <= LAST_CHAR_MASK_);
3765 * @param ch code point to be determined if it is printable
3768 public static boolean isPrintable(int ch)
3770 int cat = getType(ch);
3784 * @param ch code point to be determined if it is of base form
3787 public static boolean isBaseForm(int ch)
3789 int cat = getType(ch);
3810 * @param ch the code point to be determined its direction
3813 public static int getDirection(int ch)
3815 return UBiDiProps.INSTANCE.getClass(ch);
3823 * @param ch code point whose mirror is to be determined
3826 public static boolean isMirrored(int ch)
3828 return UBiDiProps.INSTANCE.isMirrored(ch);
3839 * @param ch code point whose mirror is to be retrieved
3841 * or ch itself if there is no such mapping or ch does not have the
3844 public static int getMirror(int ch)
3846 return UBiDiProps.INSTANCE.getMirror(ch);
3870 * @param ch code point whose combining is to be retrieved
3873 public static int getCombiningClass(int ch)
3875 return Normalizer2.getNFDInstance().getCombiningClass(ch);
3886 * @param ch code point to determine if it is a legal code point by itself
3889 public static boolean isLegal(int ch)
3891 if (ch < MIN_VALUE) {
3894 if (ch < Character.MIN_SURROGATE) {
3897 if (ch <= Character.MAX_SURROGATE) {
3900 if (UCharacterUtility.isNonCharacter(ch)) {
3903 return (ch <= MAX_VALUE);
3948 * @param ch the code point for which to get the name
3951 public static String getName(int ch)
3953 return UCharacterName.INSTANCE.getName(ch, UCharacterNameChoice.UNICODE_CHAR_NAME);
3979 * @param ch the code point for which to get the name
3985 public static String getName1_0(int ch)
4004 * @param ch the code point for which to get the name
4007 ch) {
4008 return UCharacterName.INSTANCE.getName(ch, UCharacterNameChoice.EXTENDED_CHAR_NAME);
4018 * @param ch the code point for which to get the name alias
4021 public static String getNameAlias(int ch)
4023 return UCharacterName.INSTANCE.getName(ch, UCharacterNameChoice.CHAR_NAME_ALIAS);
4031 * @param ch The code point for which to get the ISO comment.
4032 * It must be the case that {@code 0 <= ch <= 0x10ffff}.
4038 public static String getISOComment(int ch)
4596 * @param ch the character to be converted
4605 public static int foldCase(int ch, boolean defaultmapping) {
4606 return foldCase(ch, defaultmapping ? FOLD_CASE_DEFAULT : FOLD_CASE_EXCLUDE_SPECIAL_I);
4615 * foldCase(int ch, boolean defaultmapping).
4663 * @param ch the character to be converted
4670 public static int foldCase(int ch, int options) {
4671 return UCaseProps.INSTANCE.fold(ch, options);
4680 * foldCase(int ch, boolean defaultmapping).
4708 * @param ch code point to query
4711 public static int getHanNumericValue(int ch)
4713 switch(ch)
4898 * @param ch The code point.
4901 public static VersionInfo getAge(int ch)
4903 if (ch < MIN_VALUE || ch > MAX_VALUE) {
4906 return UCharacterProperty.INSTANCE.getAge(ch);
4924 * @param ch code point to test.
4928 * for ch. Also false if property is out of bounds or if the
4933 public static boolean hasBinaryProperty(int ch, int property)
4935 return UCharacterProperty.INSTANCE.hasBinaryProperty(ch, property);
4940 * <p>Same as UCharacter.hasBinaryProperty(ch, UProperty.ALPHABETIC).
4941 * <p>Different from UCharacter.isLetter(ch)!
4942 * @param ch codepoint to be tested
4944 public static boolean isUAlphabetic(int ch)
4946 return hasBinaryProperty(ch, UProperty.ALPHABETIC);
4951 * <p>Same as UCharacter.hasBinaryProperty(ch, UProperty.LOWERCASE).
4952 * <p>This is different from UCharacter.isLowerCase(ch)!
4953 * @param ch codepoint to be tested
4955 public static boolean isULowercase(int ch)
4957 return hasBinaryProperty(ch, UProperty.LOWERCASE);
4962 * <p>Same as UCharacter.hasBinaryProperty(ch, UProperty.UPPERCASE).
4963 * <p>This is different from UCharacter.isUpperCase(ch)!
4964 * @param ch codepoint to be tested
4966 public static boolean isUUppercase(int ch)
4968 return hasBinaryProperty(ch, UProperty.UPPERCASE);
4973 * <p>Same as UCharacter.hasBinaryProperty(ch, UProperty.WHITE_SPACE).
4974 * <p>This is different from both UCharacter.isSpace(ch) and
4975 * UCharacter.isWhitespace(ch)!
4976 * @param ch codepoint to be tested
4978 public static boolean isUWhiteSpace(int ch)
4980 return hasBinaryProperty(ch, UProperty.WHITE_SPACE);
5000 * @param ch code point to test.
5021 public static int getIntPropertyValue(int ch, int type)
5023 return UCharacterProperty.INSTANCE.getIntPropertyValue(ch, type);
5195 * @param ch the char to check
5196 * @return true if ch is a high (lead) surrogate
5198 public static boolean isHighSurrogate(char ch) {
5199 return Character.isHighSurrogate(ch);
5205 * @param ch the char to check
5206 * @return true if ch is a low (trail) surrogate
5208 public static boolean isLowSurrogate(char ch) {
5209 return Character.isLowSurrogate(ch);
5454 char ch = text.charAt(--limit);
5455 while (ch >= MIN_LOW_SURROGATE && ch <= MAX_LOW_SURROGATE && limit > start) {
5456 ch = text.charAt(--limit);
5457 if (ch >= MIN_HIGH_SURROGATE && ch <= MAX_HIGH_SURROGATE) {
5483 char ch = text[--limit];
5484 while (ch >= MIN_LOW_SURROGATE && ch <= MAX_LOW_SURROGATE && limit > start) {
5485 ch = text[--limit];
5486 if (ch >= MIN_HIGH_SURROGATE && ch <= MAX_HIGH_SURROGATE) {
5511 char ch = text.charAt(--index);
5512 while (ch >= MIN_LOW_SURROGATE && ch <= MAX_LOW_SURROGATE && index > 0) {
5513 ch = text.charAt(--index);
5514 if (ch < MIN_HIGH_SURROGATE || ch > MAX_HIGH_SURROGATE) {
5524 char ch = text.charAt(index++);
5525 while (ch >= MIN_HIGH_SURROGATE && ch <= MAX_HIGH_SURROGATE && index < limit) {
5526 ch = text.charAt(index++);
5527 if (ch < MIN_LOW_SURROGATE || ch > MAX_LOW_SURROGATE) {
5562 char ch = text[--index];
5568 while (ch >= MIN_LOW_SURROGATE && ch <= MAX_LOW_SURROGATE && index > start) {
5569 ch = text[--index];
5570 if (ch < MIN_HIGH_SURROGATE || ch > MAX_HIGH_SURROGATE) {
5579 char ch = text[index++];
5585 while (ch >= MIN_HIGH_SURROGATE && ch <= MAX_HIGH_SURROGATE && index < limit) {
5586 ch = text[index++];
5587 if (ch < MIN_LOW_SURROGATE || ch > MAX_LOW_SURROGATE) {