Top Description Inners Fields Constructors Methods
com.ibm.icu.lang

public final Class UCharacter

extends Object
implements ECharacterCategory, ECharacterDirection
Class Inheritance
All Implemented Interfaces
com.ibm.icu.lang.UCharacterEnums.ECharacterDirection, com.ibm.icu.lang.UCharacterEnums.ECharacterCategory
Imports
java.lang.ref.SoftReference, java.util.HashMap, .Iterator, .Locale, .Map, com.ibm.icu.impl.CaseMapImpl, .EmojiProps, .IllegalIcuArgumentException, .Trie2, .UBiDiProps, .UCaseProps, .UCharacterName, .UCharacterNameChoice, .UCharacterProperty, .UCharacterUtility, .UPropertyAliases, com.ibm.icu.lang.UCharacterEnums.ECharacterCategory, .UCharacterEnums.ECharacterDirection, com.ibm.icu.text.BreakIterator, .Normalizer2, com.ibm.icu.util.RangeValueIterator, .ULocale, .ValueIterator, .VersionInfo

ICU Enhancement

This class is ICU's replacement for java.lang.Character.

ICU

Methods, fields, and other functionality specific to ICU are labeled 'ICU'.

The UCharacter class provides extensions to the java.lang.Character class. These extensions provide support for more Unicode properties. Each ICU release supports the latest version of Unicode available at that time.

For some time before Java 5 added support for supplementary Unicode code points, The ICU UCharacter class and many other ICU classes already supported them. Some UCharacter methods and constants were widened slightly differently than how the Character class methods and constants were widened later. In particular, Character#MAX_VALUE is still a char with the value U+FFFF, while the UCharacter#MAX_VALUE is an int with the value U+10FFFF.

Code points are represented in these API using ints. While it would be more convenient in Java to have a separate primitive datatype for them, ints suffice in the meantime.

To use this class please add the jar file name icu4j.jar to the class path, since it contains data files which supply the information used by this file.
E.g. In Windows
set CLASSPATH=%CLASSPATH%;$JAR_FILE_PATH/ucharacter.jar.
Otherwise, another method would be to copy the files uprops.dat and unames.icu from the icu4j source subdirectory $ICU4J_SRC/src/com.ibm.icu.impl.data to your class directory $ICU4J_CLASS/com.ibm.icu.impl.data.

Aside from the additions for UTF-16 support, and the updated Unicode properties, the main differences between UCharacter and Character are:

Further detail on differences can be determined using the program com.ibm.icu.dev.test.lang.UCharacterCompare

In addition to Java compatibility functions, which calculate derived properties, this API provides low-level access to the Unicode Character Database.

Unicode assigns each code point (not just assigned character) values for many properties. Most of them are simple boolean flags, or constants from a small enumerated list. For some properties, values are strings or other relatively more complex types.

For more information see "About the Unicode Character Database" (http://www.unicode.org/ucd/) and the ICU User Guide chapter on Properties (https://unicode-org.github.io/icu/userguide/strings/properties).

There are also functions that provide easy migration from C/POSIX functions like isblank(). Their use is generally discouraged because the C/POSIX standards do not define their semantics beyond the ASCII range, which means that different implementations exhibit very different behavior. Instead, Unicode properties should be used directly.

There are also only a few, broad C/POSIX character classes, and they tend to be used for conflicting purposes. For example, the "isalpha()" class is sometimes used to determine word boundaries, while a more sophisticated approach would at least distinguish initial letters from continuation characters (the latter including combining marks). (In ICU, BreakIterator is the most sophisticated API for word boundaries.) Another example: There is no "istitle()" class for titlecase characters.

ICU 3.4 and later provides API access for all twelve C/POSIX character classes. ICU implements them according to the Standard Recommendations in Annex C: Compatibility Properties of UTS #18 Unicode Regular Expressions (http://www.unicode.org/reports/tr18/#Compatibility_Properties).

API access for C/POSIX character classes is as follows:

- alpha:     isUAlphabetic(c) or hasBinaryProperty(c, UProperty.ALPHABETIC)
- lower:     isULowercase(c) or hasBinaryProperty(c, UProperty.LOWERCASE)
- upper:     isUUppercase(c) or hasBinaryProperty(c, UProperty.UPPERCASE)
- punct:     ((1<<getType(c)) & ((1<<DASH_PUNCTUATION)|(1<<START_PUNCTUATION)|
              (1<<END_PUNCTUATION)|(1<<CONNECTOR_PUNCTUATION)|(1<<OTHER_PUNCTUATION)|
              (1<<INITIAL_PUNCTUATION)|(1<<FINAL_PUNCTUATION)))!=0
- digit:     isDigit(c) or getType(c)==DECIMAL_DIGIT_NUMBER
- xdigit:    hasBinaryProperty(c, UProperty.POSIX_XDIGIT)
- alnum:     hasBinaryProperty(c, UProperty.POSIX_ALNUM)
- space:     isUWhiteSpace(c) or hasBinaryProperty(c, UProperty.WHITE_SPACE)
- blank:     hasBinaryProperty(c, UProperty.POSIX_BLANK)
- cntrl:     getType(c)==CONTROL
- graph:     hasBinaryProperty(c, UProperty.POSIX_GRAPH)
- print:     hasBinaryProperty(c, UProperty.POSIX_PRINT)

The C/POSIX character classes are also available in UnicodeSet patterns, using patterns like [:graph:] or \p{graph}.

ICU Note

There are several ICU (and Java) whitespace functions. Comparison:

This class is not subclassable.

Author
Syn Wee Quek
ICU Status
Stable since ICU 2.1.
See Also
com.ibm.icu.lang.UCharacterEnums

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
UCharacter.BidiPairedBracketType

Bidi Paired Bracket Type constants.

public static interface
UCharacter.DecompositionType

Decomposition Type constants.

private static class
public static interface
UCharacter.EastAsianWidth

East Asian Width constants.

public static interface
UCharacter.GraphemeClusterBreak

Grapheme Cluster Break constants.

public static interface
UCharacter.HangulSyllableType

Hangul Syllable Type constants.

public static interface
UCharacter.IndicPositionalCategory

Indic Positional Category constants.

public static interface
UCharacter.IndicSyllabicCategory

Indic Syllabic Category constants.

public static interface
UCharacter.JoiningGroup

Joining Group constants.

public static interface
UCharacter.JoiningType

Joining Type constants.

public static interface
UCharacter.LineBreak

Line Break constants.

public static interface
UCharacter.NumericType

Numeric Type constants.

public static interface
UCharacter.SentenceBreak

Sentence Break constants.

private static class
public static class
UCharacter.UnicodeBlock

ICU Enhancement

This class is ICU's replacement for java.lang.Character.UnicodeBlock.

public static interface
UCharacter.VerticalOrientation

Vertical Orientation constants.

public static interface
UCharacter.WordBreak

Word Break constants.

Field Summary

Modifier and TypeField and Description
private static final int
APPLICATION_PROGRAM_COMMAND_

Application Program command code point

private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
CJK_IDEOGRAPH_COMPLEX_ZERO_

Han digit characters

private static final int
CJK_IDEOGRAPH_EIGHTH_

CJK Ideograph, Eighth code point

private static final int
CJK_IDEOGRAPH_FIFTH_

CJK Ideograph, FIFTH code point

private static final int
CJK_IDEOGRAPH_FIRST_

CJK Ideograph, First code point

private static final int
CJK_IDEOGRAPH_FOURTH_

CJK Ideograph, Fourth code point

private static final int
private static final int
private static final int
CJK_IDEOGRAPH_NINETH_

CJK Ideograph, Nineth code point

private static final int
CJK_IDEOGRAPH_SECOND_

CJK Ideograph, Second code point

private static final int
CJK_IDEOGRAPH_SEVENTH_

CJK Ideograph, Seventh code point

private static final int
CJK_IDEOGRAPH_SIXTH_

CJK Ideograph, Sixth code point

private static final int
private static final int
private static final int
CJK_IDEOGRAPH_THIRD_

CJK Ideograph, Third code point

private static final int
private static final int
DELETE_

Delete code point

private static final int
FIGURE_SPACE_

Figure space code point

public static final int
public static final int
private static final int
IDEOGRAPHIC_NUMBER_ZERO_

Ideographic number zero code point

private static final int
LAST_CHAR_MASK_

To get the last character out from a data type

private static final int
LEAD_SURROGATE_BITMASK

Lead surrogate bitmask

private static final int
LEAD_SURROGATE_BITS

Lead surrogate bits

public static final int
MAX_CODE_POINT

Constant U+10FFFF, same as Character#MAX_CODE_POINT.

public static final char
public static final char
public static final int
MAX_RADIX

Compatibility constant for Java Character's MAX_RADIX.

public static final char
MAX_SURROGATE

Constant U+DFFF, same as Character#MAX_SURROGATE.

public static final int
MAX_VALUE

The highest Unicode code point value (scalar value), constant U+10FFFF (uses 21 bits).

public static final int
MIN_CODE_POINT

Constant U+0000, same as Character#MIN_CODE_POINT.

public static final char
public static final char
public static final int
MIN_RADIX

Compatibility constant for Java Character's MIN_RADIX.

public static final int
public static final char
MIN_SURROGATE

Constant U+D800, same as Character#MIN_SURROGATE.

public static final int
MIN_VALUE

The lowest Unicode code point value, constant 0.

private static final int
NARROW_NO_BREAK_SPACE_

Narrow no break space code point

private static final int
NO_BREAK_SPACE_

No break space code point

public static final double
NO_NUMERIC_VALUE

Special value that is returned by getUnicodeNumericValue(int) when no numeric value is defined for a code point.

public static final int
REPLACEMENT_CHAR

Unicode value used when translating into Unicode encoding form and there is no existing character.

public static final int
SUPPLEMENTARY_MIN_VALUE

The minimum value for Supplementary code points, constant U+10000.

public static final int
TITLECASE_NO_BREAK_ADJUSTMENT

Do not adjust the titlecasing indexes from BreakIterator::next() indexes; titlecase exactly the characters at breaks from the iterator.

public static final int
TITLECASE_NO_LOWERCASE

Do not lowercase non-initial parts of words when titlecasing.

private static final int
TRAIL_SURROGATE_BITMASK

Trail surrogate bitmask

private static final int
TRAIL_SURROGATE_BITS

Trail surrogate bits

private static final int
private static final int
UNIT_SEPARATOR_

Unit separator code point

Constructor Summary

AccessConstructor and Description
private
UCharacter()

Private constructor to prevent instantiation

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

the number of chars needed to represent the code point
charCount
(int
the code point to check
cp
)

Same as Character#charCount.

public static final int

Returns:

the code point at the index
codePointAt
(CharSequence
the characters to check
seq
,
int
the index of the first or only char forming the code point
index
)

Same as Character#codePointAt(CharSequence, int).

public static final int

Returns:

the code point at the index
codePointAt
(char[]
the characters to check
text
,
int
the index of the first or only char forming the code point
index
)

Same as Character#codePointAt(char[], int).

public static final int

Returns:

the code point at the index
codePointAt
(char[]
the characters to check
text
,
int
the index of the first or only char forming the code point
index
,
int
the limit of the valid text
limit
)

Same as Character#codePointAt(char[], int, int).

public static final int

Returns:

the code point before the index
codePointBefore
(CharSequence
the characters to check
seq
,
int
the index after the last or only char forming the code point
index
)

Same as Character#codePointBefore(CharSequence, int).

public static final int

Returns:

the code point before the index
codePointBefore
(char[]
the characters to check
text
,
int
the index after the last or only char forming the code point
index
)

Same as Character#codePointBefore(char[], int).

public static final int

Returns:

the code point before the index
codePointBefore
(char[]
the characters to check
text
,
int
the index after the last or only char forming the code point
index
,
int
the start of the valid text
limit
)

Same as Character#codePointBefore(char[], int, int).

public static int

Returns:

the number of code points in the range
codePointCount
(CharSequence
the characters to check
text
,
int
the start of the range
start
,
int
the limit of the range
limit
)

Equivalent to the Character#codePointCount(CharSequence, int, int) method, for convenience.

public static int

Returns:

the number of code points in the range
codePointCount
(char[]
the characters to check
text
,
int
the start of the range
start
,
int
the limit of the range
limit
)

Equivalent to the Character#codePointCount(char[], int, int) method, for convenience.

public static int

Returns:

the numeric value represented by the code point in the specified radix, or -1 if the code point is not a decimal digit or if its value is too large for the radix
digit
(int
the code point to query
ch
,
int
the radix
radix
)

Returnss the numeric value of a decimal digit code point.

public static int

Returns:

the numeric value represented by the code point, or -1 if the code point is not a decimal digit or if its value is too large for a decimal radix
digit
(int
the code point to query
ch
)

Returnss the numeric value of a decimal digit code point.

public static int

Returns:

the case folding equivalent of the character, if any; otherwise the character itself.
foldCase
(int
the character to be converted
ch
,
boolean
Indicates whether the default mappings defined in CaseFolding.txt are to be used, otherwise the mappings for dotted I and dotless i marked with 'T' in CaseFolding.txt are included.
defaultmapping
)

ICU

public static String

Returns:

the case folding equivalent of the character, if any; otherwise the character itself.
foldCase
(String
the String to be converted
str
,
boolean
Indicates whether the default mappings defined in CaseFolding.txt are to be used, otherwise the mappings for dotted I and dotless i marked with 'T' in CaseFolding.txt are included.
defaultmapping
)

ICU

public static int

Returns:

the case folding equivalent of the character, if any; otherwise the character itself.
foldCase
(int
the character to be converted
ch
,
int
A bit set for special processing. Currently the recognised options are FOLD_CASE_EXCLUDE_SPECIAL_I and FOLD_CASE_DEFAULT
options
)

ICU

public static final String

Returns:

the case folding equivalent of the character, if any; otherwise the character itself.
foldCase
(String
the String to be converted
str
,
int
A bit set for special processing. Currently the recognised options are FOLD_CASE_EXCLUDE_SPECIAL_I and FOLD_CASE_DEFAULT
options
)

ICU

public static char
forDigit(int digit, int radix)

Provide the java.lang.Character forDigit API, for convenience.

public static VersionInfo

Returns:

the Unicode version number
getAge
(int
The code point.
ch
)

ICU

public static int

Returns:

the paired bracket code point, or c itself if there is no such mapping (Bidi_Paired_Bracket_Type=None)
getBidiPairedBracket
(int
the code point to be mapped
c
)

ICU

private static int
private static int
public static int

Returns:

code point associated with the name or -1 if the name is not found.
getCharFromExtendedName
(String
codepoint name
name
)

ICU

public static int

Returns:

code point or -1 if name is not found
getCharFromName
(String
most current Unicode character name whose code point is to be returned
name
)

ICU

public static int

Returns:

-1
getCharFromName1_0
(String
Unicode 1.0 code point name whose code point is to be returned
name
)

Deprecated ICU 49

ICU

public static int

Returns:

code point or -1 if name is not found
getCharFromNameAlias
(String
Unicode name alias whose code point is to be returned
name
)

ICU

public static int

Returns:

code point if lead and trail form a valid surrogate pair.
getCodePoint
(int
the lead unit (In ICU 2.1-69 the type of both parameters was char.)
lead
,
int
the trail unit
trail
)

ICU

public static int

Returns:

code point if argument is a valid character.
getCodePoint
(char
the BMP code point
char16
)

ICU

public static int

Returns:

the combining class of the codepoint
getCombiningClass
(int
code point whose combining is to be retrieved
ch
)

ICU

private static int
public static int

Returns:

direction constant from UCharacterDirection.
getDirection
(int
the code point to be determined its direction
ch
)

ICU

public static byte

Returns:

the directionality of the code point
getDirectionality
(int
the code point to check
cp
)

Equivalent to the Character#getDirectionality(char) method, for convenience.

public static String

Returns:

a name for the argument codepoint
getExtendedName
(int
the code point for which to get the name
ch
)

ICU

public static ValueIterator

Returns:

an iterator
getExtendedNameIterator
()

ICU

public static int

Returns:

value if it is a Han 'numeric character,' otherwise return -1.
getHanNumericValue
(int
code point to query
ch
)

ICU

public static int

Returns:

Maximum value returned by u_getIntPropertyValue for a Unicode property. <= 0 if the property selector 'type' is out of range.
getIntPropertyMaxValue
(int
UProperty selector constant, identifies which binary property to check. Must be UProperty.BINARY_START <= type < UProperty.BINARY_LIMIT or UProperty.INT_START <= type < UProperty.INT_LIMIT.
type
)

ICU

public static int

Returns:

Minimum value returned by UCharacter.getIntPropertyValue(int) for a Unicode property. 0 if the property selector 'type' is out of range.
getIntPropertyMinValue
(int
UProperty selector constant, identifies which binary property to check. Must be UProperty.BINARY_START <= type < UProperty.BINARY_LIMIT or UProperty.INT_START <= type < UProperty.INT_LIMIT.
type
)

ICU

public static int

Returns:

numeric value that is directly the property value or, for enumerated properties, corresponds to the numeric value of the enumerated constant of the respective property value type (ECharacterCategory, ECharacterDirection, DecompositionType, etc.). Returns 0 or 1 (for false / true) for binary Unicode properties. Returns a bit-mask for mask properties. Returns 0 if 'type' is out of bounds or if the Unicode version does not have data for the property at all, or not for this code point.
getIntPropertyValue
(int
code point to test.
ch
,
int
UProperty selector constant, identifies which binary property to check. Must be UProperty.BINARY_START <= type < UProperty.BINARY_LIMIT or UProperty.INT_START <= type < UProperty.INT_LIMIT or UProperty.MASK_START <= type < UProperty.MASK_LIMIT.
type
)

ICU

public static String

Returns:

null
getISOComment
(int
The code point for which to get the ISO comment. It must be the case that 0 <= ch <= 0x10ffff.
ch
)

Deprecated ICU 49

ICU

public static int

Returns:

another code point that may serve as a mirror-image substitute, or ch itself if there is no such mapping or ch does not have the "mirrored" property
getMirror
(int
code point whose mirror is to be retrieved
ch
)

ICU

public static String

Returns:

most current Unicode name
getName
(int
the code point for which to get the name
ch
)

ICU

public static String

Returns:

string of names
getName
(String
string to format
s
,
String
string to go between names
separator
)

ICU

public static String

Returns:

null
getName1_0
(int
the code point for which to get the name
ch
)

Deprecated ICU 49

ICU

public static ValueIterator

Returns:

an empty iterator
getName1_0Iterator
()

Deprecated ICU 49

ICU

public static String

Returns:

Unicode name alias, or null
getNameAlias
(int
the code point for which to get the name alias
ch
)

ICU

public static ValueIterator

Returns:

an iterator
getNameIterator
()

ICU

public static int

Returns:

the numeric value of the code point, or -1 if it has no numeric value, or -2 if it has a numeric value that cannot be represented as a nonnegative integer
getNumericValue
(int
the code point to query
ch
)

Returns the numeric value of the code point as a nonnegative integer.

public static int

Returns:

a UProperty enum.
getPropertyEnum
(CharSequence
the property name to be matched. The name is compared using "loose matching" as described in PropertyAliases.txt.
propertyAlias
)

ICU

public static String

Returns:

a name, or null if Unicode explicitly defines no name ("n/a") for a given property/nameChoice. If a given nameChoice throws an exception, then all larger values of nameChoice will throw an exception. If null is returned for a given nameChoice, then other nameChoice values may return non-null results.
getPropertyName
(int
UProperty selector.
property
,
int
UProperty.NameChoice selector for which name to get. All properties have a long name. Most have a short name, but some do not. Unicode allows for additional names; if present these will be returned by UProperty.NameChoice.LONG + i, where i=1, 2,...
nameChoice
)

ICU

public static int

Returns:

a value integer.

Note

UProperty.GENERAL_CATEGORY values are mask values produced by left-shifting 1 by UCharacter.getType(). This allows grouped categories such as [:L:] to be represented.

getPropertyValueEnum
(int
UProperty selector constant. UProperty.INT_START <= property < UProperty.INT_LIMIT or UProperty.BINARY_START <= property < UProperty.BINARY_LIMIT or UProperty.MASK_START < = property < UProperty.MASK_LIMIT. Only these properties can be enumerated.
property
,
CharSequence
the value name to be matched. The name is compared using "loose matching" as described in PropertyValueAliases.txt.
valueAlias
)

ICU

public static int

Returns:

returns UProperty.UNDEFINED if the value is not valid, otherwise the value.
getPropertyValueEnumNoThrow
(int property, CharSequence valueAlias)

Deprecated This API is ICU internal only.
Same as getPropertyValueEnum(int, CharSequence), except doesn't throw exception.
public static String

Returns:

a name, or null if Unicode explicitly defines no name ("n/a") for a given property/value/nameChoice. If a given nameChoice throws an exception, then all larger values of nameChoice will throw an exception. If null is returned for a given nameChoice, then other nameChoice values may return non-null results.
getPropertyValueName
(int
UProperty selector constant. UProperty.INT_START <= property < UProperty.INT_LIMIT or UProperty.BINARY_START <= property < UProperty.BINARY_LIMIT or UProperty.MASK_START < = property < UProperty.MASK_LIMIT. If out of range, null is returned.
property
,
int
selector for a value for the given property. In general, valid values range from 0 up to some maximum. There are a few exceptions: (1.) UProperty.BLOCK values begin at the non-zero value BASIC_LATIN.getID(). (2.) UProperty.CANONICAL_COMBINING_CLASS values are not contiguous and range from 0..240. (3.) UProperty.GENERAL_CATEGORY_MASK values are mask values produced by left-shifting 1 by UCharacter.getType(). This allows grouped categories such as [:L:] to be represented. Mask values are non-contiguous.
value
,
int
UProperty.NameChoice selector for which name to get. All values have a long name. Most have a short name, but some do not. Unicode allows for additional names; if present these will be returned by UProperty.NameChoice.LONG + i, where i=1, 2,...
nameChoice
)

ICU

public static String

Returns:

value as string
getStringPropertyValue
(int
The property enum value.
propertyEnum
,
int
The codepoint value.
codepoint
,
int
The choice of the name.
nameChoice
)

Deprecated This API is ICU internal only.

ICU

public static int

Returns:

category which is a value of UCharacterCategory
getType
(int
code point whose type is to be determined
ch
)

Returns a value indicating a code point's Unicode category.

public static RangeValueIterator

Returns:

an iterator
getTypeIterator
()

ICU

public static double

Returns:

numeric value of ch, or NO_NUMERIC_VALUE if none is defined.
getUnicodeNumericValue
(int
Code point to get the numeric value for.
ch
)

ICU

public static VersionInfo

Returns:

the unicode version number used
getUnicodeVersion
()

ICU

public static boolean

Returns:

true or false according to the binary Unicode property value for ch. Also false if property is out of bounds or if the Unicode version does not have data for the property at all, or not for this code point.
hasBinaryProperty
(int
code point to test.
ch
,
int
selector constant from com.ibm.icu.lang.UProperty, identifies which binary property to check.
property
)

ICU

public static boolean

Returns:

true or false according to the binary Unicode property value for the string. Also false if property is out of bounds or if the Unicode version does not have data for the property at all.
hasBinaryProperty
(CharSequence
String to test.
s
,
int
UProperty selector constant, identifies which binary property to check. Must be BINARY_START<=which<BINARY_LIMIT.
property
)

ICU

public static boolean

Returns:

true if the code point is of base form
isBaseForm
(int
code point to be determined if it is of base form
ch
)

ICU

public static boolean

Returns:

true if code point is not a supplementary character
isBMP
(int
code point to be determined if it is not a supplementary character
ch
)

ICU

public static boolean

Returns:

true if this code point is defined in unicode
isDefined
(int
code point to be determined if it is defined in the most current version of Unicode
ch
)

Determines if a code point has a defined meaning in the up-to-date Unicode standard.

public static boolean

Returns:

true if this code point is a digit
isDigit
(int
code point to query
ch
)

Determines if a code point is a Java digit.

public static boolean

Returns:

true if codePoint is a high (lead) surrogate
isHighSurrogate
(int
the code point to check (In ICU 3.0-69 the type of this parameter was char.)
codePoint
)

Same as Character#isHighSurrogate, except that the ICU version accepts int for code points.

public static boolean

Returns:

true if the code point is ignorable
isIdentifierIgnorable
(int
code point to be determined if it can be ignored in a Unicode identifier.
ch
)

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

public static boolean

Returns:

true if code point is a ISO control character
isISOControl
(int
code point to determine if it is an ISO control character
ch
)

Determines if the specified code point is an ISO control character.

public static boolean

Returns:

true if the code point can continue a java identifier.
isJavaIdentifierPart
(int
the code point
cp
)

Compatibility override of Java method, delegates to java.lang.Character.isJavaIdentifierPart.

public static boolean

Returns:

true if the code point can start a java identifier.
isJavaIdentifierStart
(int
the code point
cp
)

Compatibility override of Java method, delegates to java.lang.Character.isJavaIdentifierStart.

public static boolean

Returns:

true if the code point can start a java identifier.
isJavaLetter
(int
the code point
cp
)

Deprecated ICU 3.4 (Java)
Compatibility override of Java deprecated method.
public static boolean

Returns:

true if the code point can continue a java identifier.
isJavaLetterOrDigit
(int
the code point
cp
)

Deprecated ICU 3.4 (Java)
Compatibility override of Java deprecated method.
public static boolean

Returns:

true if and only if legal.
isLegal
(int
code point to determine if it is a legal code point by itself
ch
)

ICU

public static boolean

Returns:

true if and only if legal.
isLegal
(String
containing code points to examin
str
)

ICU

public static boolean

Returns:

true if code point is a letter
isLetter
(int
code point to determine if it is a letter
ch
)

Determines if the specified code point is a letter.

public static boolean

Returns:

true if code point is a letter or a digit
isLetterOrDigit
(int
code point to determine if it is a letter or a digit
ch
)

Determines if the specified code point is a letter or digit.

public static boolean

Returns:

true if code point is a lowercase character
isLowerCase
(int
code point to determine if it is in lowercase
ch
)

Determines if the specified code point is a lowercase character.

public static boolean

Returns:

true if codePoint is a low (trail) surrogate
isLowSurrogate
(int
the code point to check (In ICU 3.0-69 the type of this parameter was char.)
codePoint
)

Same as Character#isLowSurrogate, except that the ICU version accepts int for code points.

public static boolean

Returns:

true if the code point has the "mirrored" property
isMirrored
(int
code point whose mirror is to be determined
ch
)

Determines whether the code point has the "mirrored" property.

public static boolean

Returns:

true if the code point is a printable character
isPrintable
(int
code point to be determined if it is printable
ch
)

ICU

public static boolean

Returns:

true if the code point is a space character as defined by java.lang.Character.isSpace.
isSpace
(int
the code point
ch
)

Deprecated ICU 3.4 (Java)
Compatibility override of Java deprecated method.
public static boolean

Returns:

true if the specified code point is a space character
isSpaceChar
(int
code point to determine if it is a space
ch
)

Determines if the specified code point is a Unicode specified space character, i.e. if code point is in the category Zs, Zl and Zp.

public static boolean

Returns:

true if code point is a supplementary character
isSupplementary
(int
code point to be determined if it is in the supplementary plane
ch
)

ICU

public static final boolean

Returns:

true if cp is a supplementary code point
isSupplementaryCodePoint
(int
the code point to check
cp
)

Same as Character#isSupplementaryCodePoint.

public static final boolean

Returns:

true if high, low form a surrogate pair
isSurrogatePair
(int
the high (lead) unit (In ICU 3.0-69 the type of both parameters was char.)
high
,
int
the low (trail) unit
low
)

Same as Character#isSurrogatePair, except that the ICU version accepts int for code points.

public static boolean

Returns:

true if the specified code point is a titlecase character
isTitleCase
(int
code point to determine if it is in title case
ch
)

Determines if the specified code point is a titlecase character.

public static boolean
isUAlphabetic(int
codepoint to be tested
ch
)

ICU

public static boolean
isULowercase(int
codepoint to be tested
ch
)

ICU

public static boolean

Returns:

true if the code point may occur as a non-initial character of an identifier
isUnicodeIdentifierPart
(int
the code point to be tested
ch
)

Determines if the specified character is permissible as a non-initial character of an identifier according to UAX #31 Unicode Identifier and Pattern Syntax.

public static boolean

Returns:

true if the code point may start an identifier
isUnicodeIdentifierStart
(int
the code point to be tested
ch
)

Determines if the specified character is permissible as the first character in an identifier according to UAX #31 Unicode Identifier and Pattern Syntax.

public static boolean

Returns:

true if the code point is an uppercase character
isUpperCase
(int
code point to determine if it is in uppercase
ch
)

Determines if the specified code point is an uppercase character.

public static boolean
isUUppercase(int
codepoint to be tested
ch
)

ICU

public static boolean
isUWhiteSpace(int
codepoint to be tested
ch
)

ICU

public static final boolean

Returns:

true if cp is a valid code point
isValidCodePoint
(int
the code point to check
cp
)

Equivalent to Character#isValidCodePoint.

public static boolean

Returns:

true if the specified code point is a white space character
isWhitespace
(int
code point to determine if it is a white space
ch
)

Determines if the specified code point is a white space character.

public static int

Returns:

the adjusted index
offsetByCodePoints
(CharSequence
the characters to check
text
,
int
the index to adjust
index
,
int
the number of code points by which to offset the index
codePointOffset
)

Equivalent to the Character#offsetByCodePoints(CharSequence, int, int) method, for convenience.

public static int

Returns:

the adjusted index
offsetByCodePoints
(char[]
the characters to check
text
,
int
the start of the range to check
start
,
int
the length of the range to check
count
,
int
the index to adjust
index
,
int
the number of code points by which to offset the index
codePointOffset
)

Equivalent to the Character#offsetByCodePoints(char[], int, int, int, int) method, for convenience.

public static final int

Returns:

the count of the number of chars written (1 or 2)
toChars
(int
the code point to convert
cp
,
char[]
the destination array into which to put the char(s) representing the code point
dst
,
int
the index at which to put the first (or only) char
dstIndex
)

Same as Character#toChars(int, char[], int).

public static final char[]

Returns:

an array containing the char(s) representing the code point
toChars
(int
the code point to convert
cp
)

Same as Character#toChars(int).

public static final int

Returns:

the code point formed by the surrogate pair
toCodePoint
(int
the high (lead) surrogate (In ICU 3.0-69 the type of both parameters was char.)
high
,
int
the low (trail) surrogate
low
)

Same as Character#toCodePoint, except that the ICU version accepts int for code points.

public static int

Returns:

the lowercase equivalent code point
toLowerCase
(int
code point whose lowercase equivalent is to be retrieved
ch
)

The given code point is mapped to its lowercase equivalent; if the code point has no lowercase equivalent, the code point itself is returned.

public static String

Returns:

lowercase version of the argument string
toLowerCase
(String
source string to be performed on
str
)

Returns the lowercase version of the argument string.

public static String

Returns:

lowercase version of the argument string
toLowerCase
(Locale
which string is to be converted in
locale
,
String
source string to be performed on
str
)

Returns the lowercase version of the argument string.

public static String

Returns:

lowercase version of the argument string
toLowerCase
(ULocale
which string is to be converted in
locale
,
String
source string to be performed on
str
)

Returns the lowercase version of the argument string.

public static String

Returns:

string representation of the code point, null if code point is not defined in unicode
toString
(int
code point
ch
)

Converts argument code point and returns a String object representing the code point's value in UTF-16 format.

public static int

Returns:

titlecase code point
toTitleCase
(int
code point whose title case is to be retrieved
ch
)

Converts the code point argument to titlecase.

public static String

Returns:

titlecase version of the argument string
toTitleCase
(String
source string to be performed on
str
,
BreakIterator
break iterator to determine the positions in which the character should be title cased.
breakiter
)

Returns the titlecase version of the argument string.

public static String

Returns:

titlecase version of the argument string
toTitleCase
(Locale
which string is to be converted in
locale
,
String
source string to be performed on
str
,
BreakIterator
break iterator to determine the positions in which the character should be title cased.
breakiter
)

Returns the titlecase version of the argument string.

public static String

Returns:

titlecase version of the argument string
toTitleCase
(ULocale
which string is to be converted in
locale
,
String
source string to be performed on
str
,
BreakIterator
break iterator to determine the positions in which the character should be title cased.
titleIter
)

Returns the titlecase version of the argument string.

public static String

Returns:

titlecase version of the argument string
toTitleCase
(ULocale
which string is to be converted in
locale
,
String
source string to be performed on
str
,
BreakIterator
break iterator to determine the positions in which the character should be title cased.
titleIter
,
int
bit set to modify the titlecasing operation
options
)

Returns the titlecase version of the argument string.

public static String

Returns:

titlecase version of the argument string
toTitleCase
(Locale
which string is to be converted in
locale
,
String
source string to be performed on
str
,
BreakIterator
break iterator to determine the positions in which the character should be title cased.
titleIter
,
int
bit set to modify the titlecasing operation
options
)

ICU

public static int

Returns:

uppercase code point
toUpperCase
(int
code point whose uppercase is to be retrieved
ch
)

Converts the character argument to uppercase.

public static String

Returns:

uppercase version of the argument string
toUpperCase
(String
source string to be performed on
str
)

Returns the uppercase version of the argument string.

public static String

Returns:

uppercase version of the argument string
toUpperCase
(Locale
which string is to be converted in
locale
,
String
source string to be performed on
str
)

Returns the uppercase version of the argument string.

public static String

Returns:

uppercase version of the argument string
toUpperCase
(ULocale
which string is to be converted in
locale
,
String
source string to be performed on
str
)

Returns the uppercase version of the argument string.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait