Character
class wraps a value of the primitive
type char
in an object. An object of class
Character
contains a single field whose type is
char
.
In addition, this class provides a large number of static methods for determining a character's category (lowercase letter, digit, etc.) and for converting characters from uppercase to lowercase and vice versa.
The fields and methods of class Character
are defined in terms
of character information from the Unicode Standard, specifically the
UnicodeData file that is part of the Unicode Character Database.
This file specifies properties including name and category for every
assigned Unicode code point or character range. The file is available
from the Unicode Consortium at
http://www.unicode.org.
Character information is based on the Unicode Standard, version 15.1.
The Java platform has supported different versions of the Unicode Standard over time. Upgrades to newer versions of the Unicode Standard occurred in the following Java releases, each indicating the new version:
Java release | Unicode version |
---|---|
Java SE 22 | Unicode 15.1 |
Java SE 20 | Unicode 15.0 |
Java SE 19 | Unicode 14.0 |
Java SE 15 | Unicode 13.0 |
Java SE 13 | Unicode 12.1 |
Java SE 12 | Unicode 11.0 |
Java SE 11 | Unicode 10.0 |
Java SE 9 | Unicode 8.0 |
Java SE 8 | Unicode 6.2 |
Java SE 7 | Unicode 6.0 |
Java SE 5.0 | Unicode 4.0 |
Java SE 1.4 | Unicode 3.0 |
JDK 1.1 | Unicode 2.0 |
JDK 1.0.2 | Unicode 1.1.5 |
The char
data type (and therefore the value that a
Character
object encapsulates) are based on the
original Unicode specification, which defined characters as
fixed-width 16-bit entities. The Unicode Standard has since been
changed to allow for characters whose representation requires more
than 16 bits. The range of legal code points is now
U+0000 to U+10FFFF, known as Unicode scalar value.
(Refer to the
definition of the U+n notation in the Unicode
Standard.)
The set of characters from U+0000 to U+FFFF is
sometimes referred to as the Basic Multilingual Plane (BMP).
Characters whose code points are greater
than U+FFFF are called supplementary characters. The Java
platform uses the UTF-16 representation in char
arrays and
in the String
and StringBuffer
classes. In
this representation, supplementary characters are represented as a pair
of char
values, the first from the high-surrogates
range, (\uD800-\uDBFF), the second from the
low-surrogates range (\uDC00-\uDFFF).
A char
value, therefore, represents Basic
Multilingual Plane (BMP) code points, including the surrogate
code points, or code units of the UTF-16 encoding. An
int
value represents all Unicode code points,
including supplementary code points. The lower (least significant)
21 bits of int
are used to represent Unicode code
points and the upper (most significant) 11 bits must be zero.
Unless otherwise specified, the behavior with respect to
supplementary characters and surrogate char
values is
as follows:
char
value cannot support
supplementary characters. They treat char
values from the
surrogate ranges as undefined characters. For example,
Character.isLetter('\uD840')
returns false
, even though
this specific value if followed by any low-surrogate value in a string
would represent a letter.
int
value support all
Unicode characters, including supplementary characters. For
example, Character.isLetter(0x2F81A)
returns
true
because the code point value represents a letter
(a CJK ideograph).
In the Java SE API documentation, Unicode code point is
used for character values in the range between U+0000 and U+10FFFF,
and Unicode code unit is used for 16-bit
char
values that are code units of the UTF-16
encoding. For more information on Unicode terminology, refer to the
Unicode Glossary.
This is a value-based class; programmers should treat instances that are equal as interchangeable and should not use instances for synchronization, or unpredictable behavior may occur. For example, in a future release, synchronization may fail.
Modifier and Type | Class and Description |
---|---|
private static class | |
public static class | Character.
Instances of this class represent particular subsets of the Unicode character set. |
public static class | Character.
A family of character subsets representing the character blocks in the Unicode specification. |
public static enum | Character.
A family of character subsets representing the character scripts defined in the Unicode Standard Annex #24: Script Names. |
Modifier and Type | Field and Description |
---|---|
public static final int | BYTES
The number of bytes used to represent a |
public static final byte | COMBINING_SPACING_MARK
General category "Mc" in the Unicode specification. |
public static final byte | CONNECTOR_PUNCTUATION
General category "Pc" in the Unicode specification. |
public static final byte | CONTROL
General category "Cc" in the Unicode specification. |
public static final byte | CURRENCY_SYMBOL
General category "Sc" in the Unicode specification. |
public static final byte | DASH_PUNCTUATION
General category "Pd" in the Unicode specification. |
public static final byte | DECIMAL_DIGIT_NUMBER
General category "Nd" in the Unicode specification. |
public static final byte | DIRECTIONALITY_ARABIC_NUMBER
Weak bidirectional character type "AN" in the Unicode specification. |
public static final byte | DIRECTIONALITY_BOUNDARY_NEUTRAL
Weak bidirectional character type "BN" in the Unicode specification. |
public static final byte | DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
Weak bidirectional character type "CS" in the Unicode specification. |
public static final byte | DIRECTIONALITY_EUROPEAN_NUMBER
Weak bidirectional character type "EN" in the Unicode specification. |
public static final byte | DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
Weak bidirectional character type "ES" in the Unicode specification. |
public static final byte | DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
Weak bidirectional character type "ET" in the Unicode specification. |
public static final byte | DIRECTIONALITY_FIRST_STRONG_ISOLATE
Weak bidirectional character type "FSI" in the Unicode specification. |
public static final byte | DIRECTIONALITY_LEFT_TO_RIGHT
Strong bidirectional character type "L" in the Unicode specification. |
public static final byte | DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
Strong bidirectional character type "LRE" in the Unicode specification. |
public static final byte | DIRECTIONALITY_LEFT_TO_RIGHT_ISOLATE
Weak bidirectional character type "LRI" in the Unicode specification. |
public static final byte | DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
Strong bidirectional character type "LRO" in the Unicode specification. |
public static final byte | DIRECTIONALITY_NONSPACING_MARK
Weak bidirectional character type "NSM" in the Unicode specification. |
public static final byte | DIRECTIONALITY_OTHER_NEUTRALS
Neutral bidirectional character type "ON" in the Unicode specification. |
public static final byte | DIRECTIONALITY_PARAGRAPH_SEPARATOR
Neutral bidirectional character type "B" in the Unicode specification. |
public static final byte | DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
Weak bidirectional character type "PDF" in the Unicode specification. |
public static final byte | DIRECTIONALITY_POP_DIRECTIONAL_ISOLATE
Weak bidirectional character type "PDI" in the Unicode specification. |
public static final byte | DIRECTIONALITY_RIGHT_TO_LEFT
Strong bidirectional character type "R" in the Unicode specification. |
public static final byte | DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
Strong bidirectional character type "AL" in the Unicode specification. |
public static final byte | DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
Strong bidirectional character type "RLE" in the Unicode specification. |
public static final byte | DIRECTIONALITY_RIGHT_TO_LEFT_ISOLATE
Weak bidirectional character type "RLI" in the Unicode specification. |
public static final byte | DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
Strong bidirectional character type "RLO" in the Unicode specification. |
public static final byte | DIRECTIONALITY_SEGMENT_SEPARATOR
Neutral bidirectional character type "S" in the Unicode specification. |
public static final byte | DIRECTIONALITY_UNDEFINED
Undefined bidirectional character type. |
public static final byte | DIRECTIONALITY_WHITESPACE
Neutral bidirectional character type "WS" in the Unicode specification. |
public static final byte | ENCLOSING_MARK
General category "Me" in the Unicode specification. |
public static final byte | END_PUNCTUATION
General category "Pe" in the Unicode specification. |
pack-priv static final int | ERROR
Error flag. |
public static final byte | FINAL_QUOTE_PUNCTUATION
General category "Pf" in the Unicode specification. |
public static final byte | FORMAT
General category "Cf" in the Unicode specification. |
public static final byte | INITIAL_QUOTE_PUNCTUATION
General category "Pi" in the Unicode specification. |
public static final byte | LETTER_NUMBER
General category "Nl" in the Unicode specification. |
public static final byte | LINE_SEPARATOR
General category "Zl" in the Unicode specification. |
public static final byte | LOWERCASE_LETTER
General category "Ll" in the Unicode specification. |
public static final byte | MATH_SYMBOL
General category "Sm" in the Unicode specification. |
public static final int | MAX_CODE_POINT
The maximum value of a
Unicode code point, constant |
public static final char | MAX_HIGH_SURROGATE
The maximum value of a
Unicode high-surrogate code unit
in the UTF-16 encoding, constant |
public static final char | MAX_LOW_SURROGATE
The maximum value of a
Unicode low-surrogate code unit
in the UTF-16 encoding, constant |
public static final int | MAX_RADIX
The maximum radix available for conversion to and from strings. |
public static final char | MAX_SURROGATE
The maximum value of a Unicode surrogate code unit in the
UTF-16 encoding, constant |
public static final char | MAX_VALUE
The constant value of this field is the largest value of type
|
public static final int | MIN_CODE_POINT
The minimum value of a
Unicode code point, constant |
public static final char | MIN_HIGH_SURROGATE
The minimum value of a
Unicode high-surrogate code unit
in the UTF-16 encoding, constant |
public static final char | MIN_LOW_SURROGATE
The minimum value of a
Unicode low-surrogate code unit
in the UTF-16 encoding, constant |
public static final int | MIN_RADIX
The minimum radix available for conversion to and from strings. |
public static final int | MIN_SUPPLEMENTARY_CODE_POINT
The minimum value of a
Unicode supplementary code point, constant |
public static final char | MIN_SURROGATE
The minimum value of a Unicode surrogate code unit in the
UTF-16 encoding, constant |
public static final char | MIN_VALUE
The constant value of this field is the smallest value of type
|
public static final byte | MODIFIER_LETTER
General category "Lm" in the Unicode specification. |
public static final byte | MODIFIER_SYMBOL
General category "Sk" in the Unicode specification. |
public static final byte | NON_SPACING_MARK
General category "Mn" in the Unicode specification. |
public static final byte | OTHER_LETTER
General category "Lo" in the Unicode specification. |
public static final byte | OTHER_NUMBER
General category "No" in the Unicode specification. |
public static final byte | OTHER_PUNCTUATION
General category "Po" in the Unicode specification. |
public static final byte | OTHER_SYMBOL
General category "So" in the Unicode specification. |
public static final byte | PARAGRAPH_SEPARATOR
General category "Zp" in the Unicode specification. |
public static final byte | PRIVATE_USE
General category "Co" in the Unicode specification. |
private static final long | serialVersionUID
use serialVersionUID from JDK 1.0.2 for interoperability |
public static final int | SIZE
The number of bits used to represent a |
public static final byte | SPACE_SEPARATOR
General category "Zs" in the Unicode specification. |
public static final byte | START_PUNCTUATION
General category "Ps" in the Unicode specification. |
public static final byte | SURROGATE
General category "Cs" in the Unicode specification. |
public static final byte | TITLECASE_LETTER
General category "Lt" in the Unicode specification. |
public static final Class | TYPE
The |
public static final byte | UNASSIGNED
General category "Cn" in the Unicode specification. |
public static final byte | UPPERCASE_LETTER
General category "Lu" in the Unicode specification. |
private final char | value
The value of the |
Access | Constructor and Description |
---|---|
public | Character(char
the value to be represented by the
value)Character object.
Deprecated
for removal since 9. It is rarely appropriate to use this constructor.
Constructs a newly allocated |
Modifier and Type | Method and Description |
---|---|
public static int | Returns: 2 if the character is a valid supplementary character; 1 otherwise.the character (Unicode code point) to be tested. codePoint)Determines the number of |
public char | Returns: the primitivechar value represented by
this object.Returns the value of this |
public static int | Returns: the Unicode code point at the given indexa sequence of seq, int char values (Unicode code
units)the index to the index)char values (Unicode
code units) in seq to be convertedReturns the code point at the given index of the
|
public static int | Returns: the Unicode code point at the given indexthe a, int char arraythe index to the index)char values (Unicode
code units) in the char array to be convertedReturns the code point at the given index of the
|
public static int | Returns: the Unicode code point at the given indexthe a, int char arraythe index to the index, int char values (Unicode
code units) in the char array to be convertedthe index after the last array element that
can be used in the limit)char arrayReturns the code point at the given index of the
|
pack-priv static int | |
public static int | Returns: the Unicode code point value before the given index.the seq, int CharSequence instancethe index following the code point that should be returned index)Returns the code point preceding the given index of the
|
public static int | Returns: the Unicode code point value before the given index.the a, int char arraythe index following the code point that should be returned index)Returns the code point preceding the given index of the
|
public static int | Returns: the Unicode code point value before the given index.the a, int char arraythe index following the code point that should be returned index, int the index of the first array element in the
start)char arrayReturns the code point preceding the given index of the
|
pack-priv static int | |
public static int | Returns: the number of Unicode code points in the specified text rangethe char sequence seq, int the index to the first beginIndex, int char of
the text range.the index after the last endIndex)char of
the text range.Returns the number of Unicode code points in the text range of the specified char sequence. |
public static int | Returns: the number of Unicode code points in the specified subarraythe a, int char arraythe index of the first offset, int char in the
given char arraythe length of the subarray in count)char sReturns the number of Unicode code points in a subarray of the
|
pack-priv static int | |
public static int | Returns: the code point value of the character specified by its name.the character name name)Returns the code point value of the Unicode character specified by the given character name. |
public static int | Returns: the value0 if x == y ;
a value less than 0 if x < y ; and
a value greater than 0 if x > y the first x, char char to comparethe second y)char to compareCompares two |
public int | Returns: the value0 if the argument Character
is equal to this Character ; a value less than
0 if this Character is numerically less
than the Character argument; and a value greater than
0 if this Character is numerically greater
than the Character argument (unsigned comparison).
Note that this is strictly a numerical comparison; it is not
locale-dependent.the anotherCharacter)Character to be compared.Implements java. Compares two |
public Optional | describeConstable()
Implements java. Returns an |
public static int | Returns: the numeric value represented by the character in the specified radix.the character to be converted. ch, int the radix. radix)Returns the numeric value of the character |
public static int | Returns: the numeric value represented by the character in the specified radix.the character (Unicode code point) to be converted. codePoint, int the radix. radix)Returns the numeric value of the specified character (Unicode code point) in the specified radix. |
public boolean | Returns: true if the objects are the same;
false otherwise.the object to compare with. obj)Overrides java. Compares this object against the specified object. |
public static char | Returns: thechar representation of the specified digit
in the specified radix.the number to convert to a character. digit, int the radix. radix)Determines the character representation for a specific digit in the specified radix. |
public static byte | Returns: the directionality property of thechar value.char for which the directionality property
is requested.Returns the Unicode directionality property for the given character. |
public static byte | Returns: the directionality property of the character.the character (Unicode code point) for which
the directionality property is requested. codePoint)Returns the Unicode directionality property for the given character (Unicode code point). |
public static String | Returns: the name of the specified character, or null if the code point is unassigned.the character (Unicode code point) codePoint)Returns the name of the specified character
|
public static int | Returns: the numeric value of the character, as a nonnegativeint
value; -2 if the character has a numeric value but the value
can not be represented as a nonnegative int value;
-1 if the character has no numeric value.the character to be converted. ch)Returns the |
public static int | Returns: the numeric value of the character, as a nonnegativeint
value; -2 if the character has a numeric value but the value
can not be represented as a nonnegative int value;
-1 if the character has no numeric value.the character (Unicode code point) to be converted. codePoint)Returns the |
public static int | Returns: a value of typeint representing the
character's general category.the character to be tested. ch)Returns a value indicating a character's general category. |
public static int | Returns: a value of typeint representing the
character's general category.the character (Unicode code point) to be tested. codePoint)Returns a value indicating a character's general category. |
public int | Returns: a hash code value for thisCharacter Overrides java. Returns a hash code for this |
public static int | Returns: a hash code value for achar value.The value)char for which to return a hash code.Returns a hash code for a |
public static char | Returns: the leading surrogate code unit used to represent the character in the UTF-16 encodinga supplementary character (Unicode code point) 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. |
public static boolean | Returns: true if the character is a Unicode alphabet
character, false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is alphabetic. |
public static boolean | isBmpCodePoint(int
the character (Unicode code point) to be tested codePoint)Determines whether the specified character (Unicode code point) is in the Basic Multilingual Plane (BMP). |
public static boolean | Returns: true if the character has a defined meaning
in Unicode; false otherwise.the character to be tested ch)Determines if a character is defined in Unicode. |
public static boolean | Returns: true if the character has a defined meaning
in Unicode; false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if a character (Unicode code point) is defined in Unicode. |
public static boolean | Returns: true if the character is a digit;
false otherwise.the character to be tested. ch)Determines if the specified character is a digit. |
public static boolean | Returns: true if the character is a digit;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is a digit. |
public static boolean | Returns: true if the character is an Emoji;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is an Emoji. |
public static boolean | Returns: true if the character is an Emoji Component;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is an Emoji Component. |
public static boolean | Returns: true if the character is an Emoji Modifier;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is an Emoji Modifier. |
public static boolean | Returns: true if the character is an Emoji Modifier Base;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is an Emoji Modifier Base. |
public static boolean | Returns: true if the character has the Emoji Presentation
property; false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) has the Emoji Presentation property by default. |
public static boolean | Returns: true if the character is an Extended Pictographic;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is an Extended Pictographic. |
public static boolean | Returns: true if the char value is between
MIN_HIGH_SURROGATE and
MAX_HIGH_SURROGATE inclusive;
false otherwise.the ch)char value to be tested.Determines if the given |
public static boolean | Returns: true if the character is an ignorable control
character that may be part of a Java or Unicode identifier;
false otherwise.the character to be tested. ch)Determines if the specified character should be regarded as an ignorable character in a Java identifier or a Unicode identifier. |
public static boolean | Returns: true if the character is an ignorable control
character that may be part of a Java or Unicode identifier;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) should be regarded as an ignorable character in a Java identifier or a Unicode identifier. |
public static boolean | Returns: true if the character is a Unicode ideograph
character, false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is a CJKV (Chinese, Japanese, Korean and Vietnamese) ideograph, as defined by the Unicode Standard. |
public static boolean | Returns: true if the character is an ISO control character;
false otherwise.the character to be tested. ch)Determines if the specified character is an ISO control character. |
public static boolean | Returns: true if the character is an ISO control character;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the referenced character (Unicode code point) is an ISO control character. |
public static boolean | Returns: true if the character may be part of a
Java identifier; false otherwise.the character to be tested. ch)Determines if the specified character may be part of a Java identifier as other than the first character. |
public static boolean | Returns: true if the character may be part of a
Java identifier; false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the character (Unicode code point) may be part of a Java identifier as other than the first character. |
public static boolean | Returns: true if the character may start a Java identifier;
false otherwise.the character to be tested. ch)Determines if the specified character is permissible as the first character in a Java identifier. |
public static boolean | Returns: true if the character may start a Java identifier;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the character (Unicode code point) is permissible as the first character in a Java identifier. |
public static boolean | Returns: true if the character may start a Java
identifier; false otherwise.the character to be tested. ch)
Deprecated
since 1.1. Replaced by isJavaIdentifierStart(char).
Determines if the specified character is permissible as the first character in a Java identifier. |
public static boolean | Returns: true if the character may be part of a
Java identifier; false otherwise.the character to be tested. ch)
Deprecated
since 1.1. Replaced by isJavaIdentifierPart(char).
Determines if the specified character may be part of a Java identifier as other than the first character. |
public static boolean | Returns: true if the character is a letter;
false otherwise.the character to be tested. ch)Determines if the specified character is a letter. |
public static boolean | Returns: true if the character is a letter;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is a letter. |
public static boolean | Returns: true if the character is a letter or digit;
false otherwise.the character to be tested. ch)Determines if the specified character is a letter or digit. |
public static boolean | Returns: true if the character is a letter or digit;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is a letter or digit. |
public static boolean | Returns: true if the character is lowercase;
false otherwise.the character to be tested. ch)Determines if the specified character is a lowercase character. |
public static boolean | Returns: true if the character is lowercase;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is a lowercase character. |
public static boolean | Returns: true if the char value is between
MIN_LOW_SURROGATE and
MAX_LOW_SURROGATE inclusive;
false otherwise.the ch)char value to be tested.Determines if the given |
public static boolean | Returns: true if the char is mirrored, false
if the char is not mirrored or is not defined.char for which the mirrored property is requestedDetermines whether the character is mirrored according to the Unicode specification. |
public static boolean | Returns: true if the character is mirrored, false
if the character is not mirrored or is not defined.the character (Unicode code point) to be tested. codePoint)Determines whether the specified character (Unicode code point) is mirrored according to the Unicode specification. |
public static boolean | Returns: true if the character is ISO-LATIN-1 white
space; false otherwise.the character to be tested. ch)
Deprecated
since 1.1. Replaced by isWhitespace(char).
Determines if the specified character is ISO-LATIN-1 white space. |
public static boolean | Returns: true if the character is a space character;
false otherwise.the character to be tested. ch)Determines if the specified character is a Unicode space character. |
public static boolean | Returns: true if the character is a space character;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is a Unicode space character. |
public static boolean | Returns: true if the specified code point is between
MIN_SUPPLEMENTARY_CODE_POINT and
MAX_CODE_POINT inclusive;
false otherwise.the character (Unicode code point) to be tested codePoint)Determines whether the specified character (Unicode code point) is in the supplementary character range. |
public static boolean | Returns: true if the char value is between
MIN_SURROGATE and
MAX_SURROGATE inclusive;
false otherwise.the ch)char value to be tested.Determines if the given |
public static boolean | Returns: true if the specified high and
low-surrogate code values represent a valid surrogate pair;
false otherwise.the high-surrogate code value to be tested high, char the low-surrogate code value to be tested low)Determines whether the specified pair of |
public static boolean | Returns: true if the character is titlecase;
false otherwise.the character to be tested. ch)Determines if the specified character is a titlecase character. |
public static boolean | Returns: true if the character is titlecase;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is a titlecase character. |
public static boolean | Returns: true if the character may be part of a
Unicode identifier; false otherwise.the character to be tested. ch)Determines if the specified character may be part of a Unicode identifier as other than the first character. |
public static boolean | Returns: true if the character may be part of a
Unicode identifier; false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) may be part of a Unicode identifier as other than the first character. |
public static boolean | Returns: true if the character may start a Unicode
identifier; false otherwise.the character to be tested. ch)Determines if the specified character is permissible as the first character in a Unicode identifier. |
public static boolean | Returns: true if the character may start a Unicode
identifier; false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is permissible as the first character in a Unicode identifier. |
public static boolean | Returns: true if the character is uppercase;
false otherwise.the character to be tested. ch)Determines if the specified character is an uppercase character. |
public static boolean | Returns: true if the character is uppercase;
false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is an uppercase character. |
public static boolean | Returns: true if the specified code point value is between
MIN_CODE_POINT and
MAX_CODE_POINT inclusive;
false otherwise.the Unicode code point to be tested codePoint)Determines whether the specified code point is a valid Unicode code point value. |
public static boolean | Returns: true if the character is a Java whitespace
character; false otherwise.the character to be tested. ch)Determines if the specified character is white space according to Java. |
public static boolean | Returns: true if the character is a Java whitespace
character; false otherwise.the character (Unicode code point) to be tested. codePoint)Determines if the specified character (Unicode code point) is white space according to Java. |
public static char | Returns: the trailing surrogate code unit used to represent the character in the UTF-16 encodinga supplementary character (Unicode code point) 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. |
public static int | Returns: the index within the char sequencethe char sequence seq, int the index to be offset index, int the offset in code points codePointOffset)Returns the index within the given char sequence that is offset
from the given |
public static int | Returns: the index within the subarraythe a, int char arraythe index of the first start, int char of the
subarraythe length of the subarray in count, int char sthe index to be offset index, int the offset in code points codePointOffset)Returns the index within the given |
pack-priv static int | |
public static char | Returns: the value obtained by reversing (or, equivalently, swapping) the bytes in the specifiedchar value.The ch)char of which to reverse the byte order.Returns the value obtained by reversing the order of the bytes in the
specified |
public static int | Returns: 1 if the code point is a BMP code point, 2 if the code point is a supplementary code point.the character (Unicode code point) to be converted. codePoint, char[] an array of dst, int char in which the
codePoint 's UTF-16 value is stored.the start index into the dstIndex)dst
array where the converted value is stored.Converts the specified character (Unicode code point) to its UTF-16 representation. |
public static char[] | Returns: achar array having
codePoint 's UTF-16 representation.a Unicode code point codePoint)Converts the specified character (Unicode code point) to its
UTF-16 representation stored in a |
public static int | Returns: the supplementary code point composed from the specified surrogate pair.the high-surrogate code unit high, char the low-surrogate code unit low)Converts the specified surrogate pair to its supplementary code point value. |
public static char | Returns: the lowercase equivalent of the character, if any; otherwise, the character itself.the character to be converted. ch)Converts the character argument to lowercase using case mapping information from the UnicodeData file. |
public static int | Returns: the lowercase equivalent of the character (Unicode code point), if any; otherwise, the character itself.the character (Unicode code point) to be converted. codePoint)Converts the character (Unicode code point) argument to lowercase using case mapping information from the UnicodeData file. |
public String | Returns: a string representation of this object.Overrides java. Returns a |
public static String | Returns: the string representation of the specifiedchar the c)char to be convertedReturns a |
public static String | Returns: the string representation of the specifiedcodePoint the codePoint)codePoint to be convertedReturns a |
pack-priv static void | |
public static char | Returns: the titlecase equivalent of the character, if any; otherwise, the character itself.the character to be converted. ch)Converts the character argument to titlecase using case mapping information from the UnicodeData file. |
public static int | Returns: the titlecase equivalent of the character, if any; otherwise, the character itself.the character (Unicode code point) to be converted. codePoint)Converts the character (Unicode code point) argument to titlecase using case mapping information from the UnicodeData file. |
public static char | Returns: the uppercase equivalent of the character, if any; otherwise, the character itself.the character to be converted. ch)Converts the character argument to uppercase using case mapping information from the UnicodeData file. |
public static int | Returns: the uppercase equivalent of the character, if any; otherwise, the character itself.the character (Unicode code point) to be converted. codePoint)Converts the character (Unicode code point) argument to uppercase using case mapping information from the UnicodeData file. |
pack-priv static char[] | Returns: achar[] with the uppercased character.the character (Unicode code point) to be converted. codePoint)Converts the character (Unicode code point) argument to uppercase using case mapping information from the SpecialCasing file in the Unicode specification. |
pack-priv static int | Returns: either the uppercase equivalent of the character, if any, or an error flag (Character.ERROR )
that indicates that a 1:M char mapping exists.the character (Unicode code point) to be converted. codePoint)Converts the character (Unicode code point) argument to uppercase using information from the UnicodeData file. |
public static Character | Returns: aCharacter instance representing c .a char value. c)Returns a |