Character (Java Platform SE 8 ) (original) (raw)

Modifier and Type

Method

Description

static int

[charCount](../../java/lang/Character.html#charCount-int-)(int codePoint)

Determines the number of char values needed to represent the specified character (Unicode code point).

char

[charValue](../../java/lang/Character.html#charValue--)()

Returns the value of this Character object.

static int

[codePointAt](../../java/lang/Character.html#codePointAt-char:A-int-)(char[] a, int index)

Returns the code point at the given index of thechar array.

static int

[codePointAt](../../java/lang/Character.html#codePointAt-char:A-int-int-)(char[] a, int index, int limit)

Returns the code point at the given index of thechar array, where only array elements withindex less than limit can be used.

static int

[codePointAt](../../java/lang/Character.html#codePointAt-java.lang.CharSequence-int-)([CharSequence](../../java/lang/CharSequence.html "interface in java.lang") seq, int index)

Returns the code point at the given index of theCharSequence.

static int

[codePointBefore](../../java/lang/Character.html#codePointBefore-char:A-int-)(char[] a, int index)

Returns the code point preceding the given index of thechar array.

static int

[codePointBefore](../../java/lang/Character.html#codePointBefore-char:A-int-int-)(char[] a, int index, int start)

Returns the code point preceding the given index of thechar array, where only array elements withindex greater than or equal to start can be used.

static int

[codePointBefore](../../java/lang/Character.html#codePointBefore-java.lang.CharSequence-int-)([CharSequence](../../java/lang/CharSequence.html "interface in java.lang") seq, int index)

Returns the code point preceding the given index of theCharSequence.

static int

[codePointCount](../../java/lang/Character.html#codePointCount-char:A-int-int-)(char[] a, int offset, int count)

Returns the number of Unicode code points in a subarray of thechar array argument.

static int

[codePointCount](../../java/lang/Character.html#codePointCount-java.lang.CharSequence-int-int-)([CharSequence](../../java/lang/CharSequence.html "interface in java.lang") seq, int beginIndex, int endIndex)

Returns the number of Unicode code points in the text range of the specified char sequence.

static int

[compare](../../java/lang/Character.html#compare-char-char-)(char x, char y)

Compares two char values numerically.

int

[compareTo](../../java/lang/Character.html#compareTo-java.lang.Character-)([Character](../../java/lang/Character.html "class in java.lang") anotherCharacter)

Compares two Character objects numerically.

static int

[digit](../../java/lang/Character.html#digit-char-int-)(char ch, int radix)

Returns the numeric value of the character ch in the specified radix.

static int

[digit](../../java/lang/Character.html#digit-int-int-)(int codePoint, int radix)

Returns the numeric value of the specified character (Unicode code point) in the specified radix.

boolean

[equals](../../java/lang/Character.html#equals-java.lang.Object-)([Object](../../java/lang/Object.html "class in java.lang") obj)

Compares this object against the specified object.

static char

[forDigit](../../java/lang/Character.html#forDigit-int-int-)(int digit, int radix)

Determines the character representation for a specific digit in the specified radix.

static byte

[getDirectionality](../../java/lang/Character.html#getDirectionality-char-)(char ch)

Returns the Unicode directionality property for the given character.

static byte

[getDirectionality](../../java/lang/Character.html#getDirectionality-int-)(int codePoint)

Returns the Unicode directionality property for the given character (Unicode code point).

static [String](../../java/lang/String.html "class in java.lang")

[getName](../../java/lang/Character.html#getName-int-)(int codePoint)

Returns the Unicode name of the specified charactercodePoint, or null if the code point isunassigned.

static int

[getNumericValue](../../java/lang/Character.html#getNumericValue-char-)(char ch)

Returns the int value that the specified Unicode character represents.

static int

[getNumericValue](../../java/lang/Character.html#getNumericValue-int-)(int codePoint)

Returns the int value that the specified character (Unicode code point) represents.

static int

[getType](../../java/lang/Character.html#getType-char-)(char ch)

Returns a value indicating a character's general category.

static int

[getType](../../java/lang/Character.html#getType-int-)(int codePoint)

Returns a value indicating a character's general category.

int

[hashCode](../../java/lang/Character.html#hashCode--)()

Returns a hash code for this Character; equal to the result of invoking charValue().

static int

[hashCode](../../java/lang/Character.html#hashCode-char-)(char value)

Returns a hash code for a char value; compatible withCharacter.hashCode().

static char

[highSurrogate](../../java/lang/Character.html#highSurrogate-int-)(int codePoint)

Returns the leading surrogate (a high surrogate code unit) of the surrogate pair representing the specified supplementary character (Unicode code point) in the UTF-16 encoding.

static boolean

[isAlphabetic](../../java/lang/Character.html#isAlphabetic-int-)(int codePoint)

Determines if the specified character (Unicode code point) is an alphabet.

static boolean

[isBmpCodePoint](../../java/lang/Character.html#isBmpCodePoint-int-)(int codePoint)

Determines whether the specified character (Unicode code point) is in the Basic Multilingual Plane (BMP).

static boolean

[isDefined](../../java/lang/Character.html#isDefined-char-)(char ch)

Determines if a character is defined in Unicode.

static boolean

[isDefined](../../java/lang/Character.html#isDefined-int-)(int codePoint)

Determines if a character (Unicode code point) is defined in Unicode.

static boolean

[isDigit](../../java/lang/Character.html#isDigit-char-)(char ch)

Determines if the specified character is a digit.

static boolean

[isDigit](../../java/lang/Character.html#isDigit-int-)(int codePoint)

Determines if the specified character (Unicode code point) is a digit.

static boolean

[isHighSurrogate](../../java/lang/Character.html#isHighSurrogate-char-)(char ch)

static boolean

[isIdentifierIgnorable](../../java/lang/Character.html#isIdentifierIgnorable-char-)(char ch)

Determines if the specified character should be regarded as an ignorable character in a Java identifier or a Unicode identifier.

static boolean

[isIdentifierIgnorable](../../java/lang/Character.html#isIdentifierIgnorable-int-)(int codePoint)

Determines if the specified character (Unicode code point) should be regarded as an ignorable character in a Java identifier or a Unicode identifier.

static boolean

[isIdeographic](../../java/lang/Character.html#isIdeographic-int-)(int codePoint)

Determines if the specified character (Unicode code point) is a CJKV (Chinese, Japanese, Korean and Vietnamese) ideograph, as defined by the Unicode Standard.

static boolean

[isISOControl](../../java/lang/Character.html#isISOControl-char-)(char ch)

Determines if the specified character is an ISO control character.

static boolean

[isISOControl](../../java/lang/Character.html#isISOControl-int-)(int codePoint)

Determines if the referenced character (Unicode code point) is an ISO control character.

static boolean

[isJavaIdentifierPart](../../java/lang/Character.html#isJavaIdentifierPart-char-)(char ch)

Determines if the specified character may be part of a Java identifier as other than the first character.

static boolean

[isJavaIdentifierPart](../../java/lang/Character.html#isJavaIdentifierPart-int-)(int codePoint)

Determines if the character (Unicode code point) may be part of a Java identifier as other than the first character.

static boolean

[isJavaIdentifierStart](../../java/lang/Character.html#isJavaIdentifierStart-char-)(char ch)

Determines if the specified character is permissible as the first character in a Java identifier.

static boolean

[isJavaIdentifierStart](../../java/lang/Character.html#isJavaIdentifierStart-int-)(int codePoint)

Determines if the character (Unicode code point) is permissible as the first character in a Java identifier.

static boolean

[isJavaLetter](../../java/lang/Character.html#isJavaLetter-char-)(char ch)

static boolean

[isJavaLetterOrDigit](../../java/lang/Character.html#isJavaLetterOrDigit-char-)(char ch)

static boolean

[isLetter](../../java/lang/Character.html#isLetter-char-)(char ch)

Determines if the specified character is a letter.

static boolean

[isLetter](../../java/lang/Character.html#isLetter-int-)(int codePoint)

Determines if the specified character (Unicode code point) is a letter.

static boolean

[isLetterOrDigit](../../java/lang/Character.html#isLetterOrDigit-char-)(char ch)

Determines if the specified character is a letter or digit.

static boolean

[isLetterOrDigit](../../java/lang/Character.html#isLetterOrDigit-int-)(int codePoint)

Determines if the specified character (Unicode code point) is a letter or digit.

static boolean

[isLowerCase](../../java/lang/Character.html#isLowerCase-char-)(char ch)

Determines if the specified character is a lowercase character.

static boolean

[isLowerCase](../../java/lang/Character.html#isLowerCase-int-)(int codePoint)

Determines if the specified character (Unicode code point) is a lowercase character.

static boolean

[isLowSurrogate](../../java/lang/Character.html#isLowSurrogate-char-)(char ch)

static boolean

[isMirrored](../../java/lang/Character.html#isMirrored-char-)(char ch)

Determines whether the character is mirrored according to the Unicode specification.

static boolean

[isMirrored](../../java/lang/Character.html#isMirrored-int-)(int codePoint)

Determines whether the specified character (Unicode code point) is mirrored according to the Unicode specification.

static boolean

[isSpace](../../java/lang/Character.html#isSpace-char-)(char ch)

static boolean

[isSpaceChar](../../java/lang/Character.html#isSpaceChar-char-)(char ch)

Determines if the specified character is a Unicode space character.

static boolean

[isSpaceChar](../../java/lang/Character.html#isSpaceChar-int-)(int codePoint)

Determines if the specified character (Unicode code point) is a Unicode space character.

static boolean

[isSupplementaryCodePoint](../../java/lang/Character.html#isSupplementaryCodePoint-int-)(int codePoint)

Determines whether the specified character (Unicode code point) is in the supplementary character range.

static boolean

[isSurrogate](../../java/lang/Character.html#isSurrogate-char-)(char ch)

Determines if the given char value is a Unicode_surrogate code unit_.

static boolean

[isSurrogatePair](../../java/lang/Character.html#isSurrogatePair-char-char-)(char high, char low)

static boolean

[isTitleCase](../../java/lang/Character.html#isTitleCase-char-)(char ch)

Determines if the specified character is a titlecase character.

static boolean

[isTitleCase](../../java/lang/Character.html#isTitleCase-int-)(int codePoint)

Determines if the specified character (Unicode code point) is a titlecase character.

static boolean

[isUnicodeIdentifierPart](../../java/lang/Character.html#isUnicodeIdentifierPart-char-)(char ch)

Determines if the specified character may be part of a Unicode identifier as other than the first character.

static boolean

[isUnicodeIdentifierPart](../../java/lang/Character.html#isUnicodeIdentifierPart-int-)(int codePoint)

Determines if the specified character (Unicode code point) may be part of a Unicode identifier as other than the first character.

static boolean

[isUnicodeIdentifierStart](../../java/lang/Character.html#isUnicodeIdentifierStart-char-)(char ch)

Determines if the specified character is permissible as the first character in a Unicode identifier.

static boolean

[isUnicodeIdentifierStart](../../java/lang/Character.html#isUnicodeIdentifierStart-int-)(int codePoint)

Determines if the specified character (Unicode code point) is permissible as the first character in a Unicode identifier.

static boolean

[isUpperCase](../../java/lang/Character.html#isUpperCase-char-)(char ch)

Determines if the specified character is an uppercase character.

static boolean

[isUpperCase](../../java/lang/Character.html#isUpperCase-int-)(int codePoint)

Determines if the specified character (Unicode code point) is an uppercase character.

static boolean

[isValidCodePoint](../../java/lang/Character.html#isValidCodePoint-int-)(int codePoint)

static boolean

[isWhitespace](../../java/lang/Character.html#isWhitespace-char-)(char ch)

Determines if the specified character is white space according to Java.

static boolean

[isWhitespace](../../java/lang/Character.html#isWhitespace-int-)(int codePoint)

Determines if the specified character (Unicode code point) is white space according to Java.

static char

[lowSurrogate](../../java/lang/Character.html#lowSurrogate-int-)(int codePoint)

Returns the trailing surrogate (a low surrogate code unit) of the surrogate pair representing the specified supplementary character (Unicode code point) in the UTF-16 encoding.

static int

[offsetByCodePoints](../../java/lang/Character.html#offsetByCodePoints-char:A-int-int-int-int-)(char[] a, int start, int count, int index, int codePointOffset)

Returns the index within the given char subarray that is offset from the given index bycodePointOffset code points.

static int

[offsetByCodePoints](../../java/lang/Character.html#offsetByCodePoints-java.lang.CharSequence-int-int-)([CharSequence](../../java/lang/CharSequence.html "interface in java.lang") seq, int index, int codePointOffset)

Returns the index within the given char sequence that is offset from the given index by codePointOffset code points.

static char

[reverseBytes](../../java/lang/Character.html#reverseBytes-char-)(char ch)

Returns the value obtained by reversing the order of the bytes in the specified

char

value.

static char[]

[toChars](../../java/lang/Character.html#toChars-int-)(int codePoint)

Converts the specified character (Unicode code point) to its UTF-16 representation stored in a char array.

static int

[toChars](../../java/lang/Character.html#toChars-int-char:A-int-)(int codePoint, char[] dst, int dstIndex)

Converts the specified character (Unicode code point) to its UTF-16 representation.

static int

[toCodePoint](../../java/lang/Character.html#toCodePoint-char-char-)(char high, char low)

Converts the specified surrogate pair to its supplementary code point value.

static char

[toLowerCase](../../java/lang/Character.html#toLowerCase-char-)(char ch)

Converts the character argument to lowercase using case mapping information from the UnicodeData file.

static int

[toLowerCase](../../java/lang/Character.html#toLowerCase-int-)(int codePoint)

Converts the character (Unicode code point) argument to lowercase using case mapping information from the UnicodeData file.

[String](../../java/lang/String.html "class in java.lang")

[toString](../../java/lang/Character.html#toString--)()

Returns a String object representing thisCharacter's value.

static [String](../../java/lang/String.html "class in java.lang")

[toString](../../java/lang/Character.html#toString-char-)(char c)

Returns a String object representing the specified char.

static char

[toTitleCase](../../java/lang/Character.html#toTitleCase-char-)(char ch)

Converts the character argument to titlecase using case mapping information from the UnicodeData file.

static int

[toTitleCase](../../java/lang/Character.html#toTitleCase-int-)(int codePoint)

Converts the character (Unicode code point) argument to titlecase using case mapping information from the UnicodeData file.

static char

[toUpperCase](../../java/lang/Character.html#toUpperCase-char-)(char ch)

Converts the character argument to uppercase using case mapping information from the UnicodeData file.

static int

[toUpperCase](../../java/lang/Character.html#toUpperCase-int-)(int codePoint)

Converts the character (Unicode code point) argument to uppercase using case mapping information from the UnicodeData file.

static [Character](../../java/lang/Character.html "class in java.lang")

[valueOf](../../java/lang/Character.html#valueOf-char-)(char c)

Returns a

Character

instance representing the specified

char

value.