declare namespace java { namespace lang { /** * The {@code Character} class wraps a value of the primitive * type {@code char} in an object. An object of type * {@code Character} contains a single field whose type is * {@code char}. *
* In addition, this class provides several methods for determining * a character's category (lowercase letter, digit, etc.) and for converting * characters from uppercase to lowercase and vice versa. *
* Character information is based on the Unicode Standard, version 6.2.0. *
* The methods and data of class {@code Character} are defined by * the information in the UnicodeData file that is part of the * Unicode Character Database maintained by the Unicode * Consortium. This file specifies various properties including name * and general category for every defined Unicode code point or * character range. *
* The file and its description are available from the Unicode Consortium at: *
*The {@code char} data type (and therefore the value that a * {@code 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 {@code char} arrays and * in the {@code String} and {@code StringBuffer} classes. In * this representation, supplementary characters are represented as a pair * of {@code char} values, the first from the high-surrogates * range, (\uD800-\uDBFF), the second from the * low-surrogates range (\uDC00-\uDFFF). *
A {@code char} value, therefore, represents Basic * Multilingual Plane (BMP) code points, including the surrogate * code points, or code units of the UTF-16 encoding. An * {@code int} value represents all Unicode code points, * including supplementary code points. The lower (least significant) * 21 bits of {@code 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 {@code char} values is * as follows: *
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
* {@code char} values that are code units of the UTF-16
* encoding. For more information on Unicode terminology, refer to the
* Unicode Glossary.
* @author Lee Boynton
* @author Guy Steele
* @author Akira Tanaka
* @author Martin Buchholz
* @author Ulf Zibis
* @since 1.0
*/
// @ts-ignore
class Character extends java.lang.Object implements java.io.Serializable, java.lang.Comparable Such values do not represent characters by themselves,
* but are used in the representation of
* supplementary characters
* in the UTF-16 encoding.
* @param ch the {#code char} value to be tested.
* @return {#code true} if the {@code char} value is between
* {@link #MIN_HIGH_SURROGATE} and
* {@link #MAX_HIGH_SURROGATE} inclusive;
* {@code false} otherwise.
* @see Character#isLowSurrogate(char)
* @see Character.UnicodeBlock#of(int)
* @since 1.5
*/
// @ts-ignore
public static isHighSurrogate(ch: string): boolean
/**
* Determines if the given {@code char} value is a
*
* Unicode low-surrogate code unit
* (also known as trailing-surrogate code unit).
* Such values do not represent characters by themselves,
* but are used in the representation of
* supplementary characters
* in the UTF-16 encoding.
* @param ch the {#code char} value to be tested.
* @return {#code true} if the {@code char} value is between
* {@link #MIN_LOW_SURROGATE} and
* {@link #MAX_LOW_SURROGATE} inclusive;
* {@code false} otherwise.
* @see Character#isHighSurrogate(char)
* @since 1.5
*/
// @ts-ignore
public static isLowSurrogate(ch: string): boolean
/**
* Determines if the given {@code char} value is a Unicode
* surrogate code unit.
* Such values do not represent characters by themselves,
* but are used in the representation of
* supplementary characters
* in the UTF-16 encoding.
* A char value is a surrogate code unit if and only if it is either
* a {@linkplain #isLowSurrogate(char) low-surrogate code unit} or
* a {@linkplain #isHighSurrogate(char) high-surrogate code unit}.
* @param ch the {#code char} value to be tested.
* @return {#code true} if the {@code char} value is between
* {@link #MIN_SURROGATE} and
* {@link #MAX_SURROGATE} inclusive;
* {@code false} otherwise.
* @since 1.7
*/
// @ts-ignore
public static isSurrogate(ch: string): boolean
/**
* Determines whether the specified pair of {@code char}
* values is a valid
*
* Unicode surrogate pair.
* This method is equivalent to the expression:
* This method doesn't validate the specified character to be a
* valid Unicode code point. The caller must validate the
* character value using {@link #isValidCodePoint(int) isValidCodePoint}
* if necessary.
* @param codePoint the character (Unicode code point) to be tested.
* @return 2 if the character is a valid supplementary character; 1 otherwise.
* @see Character#isSupplementaryCodePoint(int)
* @since 1.5
*/
// @ts-ignore
public static charCount(codePoint: number /*int*/): number /*int*/
/**
* Converts the specified surrogate pair to its supplementary code
* point value. This method does not validate the specified
* surrogate pair. The caller must validate it using {@link
* #isSurrogatePair(char, char) isSurrogatePair} if necessary.
* @param high the high-surrogate code unit
* @param low the low-surrogate code unit
* @return the supplementary code point composed from the
* specified surrogate pair.
* @since 1.5
*/
// @ts-ignore
public static toCodePoint(high: string, low: string): number /*int*/
/**
* Returns the code point at the given index of the
* {@code CharSequence}. If the {@code char} value at
* the given index in the {@code CharSequence} is in the
* high-surrogate range, the following index is less than the
* length of the {@code CharSequence}, and the
* {@code char} value at the following index is in the
* low-surrogate range, then the supplementary code point
* corresponding to this surrogate pair is returned. Otherwise,
* the {@code char} value at the given index is returned.
* @param seq a sequence of {#code char} values (Unicode code
* units)
* @param index the index to the {#code char} values (Unicode
* code units) in {@code seq} to be converted
* @return the Unicode code point at the given index
* @exception NullPointerException if {#code seq} is null.
* @exception IndexOutOfBoundsException if the value
* {#code index} is negative or not less than
* {@link CharSequence#length() seq.length()}.
* @since 1.5
*/
// @ts-ignore
public static codePointAt(seq: java.lang.CharSequence, index: number /*int*/): number /*int*/
/**
* Returns the code point at the given index of the
* {@code char} array. If the {@code char} value at
* the given index in the {@code char} array is in the
* high-surrogate range, the following index is less than the
* length of the {@code char} array, and the
* {@code char} value at the following index is in the
* low-surrogate range, then the supplementary code point
* corresponding to this surrogate pair is returned. Otherwise,
* the {@code char} value at the given index is returned.
* @param a the {#code char} array
* @param index the index to the {#code char} values (Unicode
* code units) in the {@code char} array to be converted
* @return the Unicode code point at the given index
* @exception NullPointerException if {#code a} is null.
* @exception IndexOutOfBoundsException if the value
* {#code index} is negative or not less than
* the length of the {@code char} array.
* @since 1.5
*/
// @ts-ignore
public static codePointAt(a: string[], index: number /*int*/): number /*int*/
/**
* Returns the code point at the given index of the
* {@code char} array, where only array elements with
* {@code index} less than {@code limit} can be used. If
* the {@code char} value at the given index in the
* {@code char} array is in the high-surrogate range, the
* following index is less than the {@code limit}, and the
* {@code char} value at the following index is in the
* low-surrogate range, then the supplementary code point
* corresponding to this surrogate pair is returned. Otherwise,
* the {@code char} value at the given index is returned.
* @param a the {#code char} array
* @param index the index to the {#code char} values (Unicode
* code units) in the {@code char} array to be converted
* @param limit the index after the last array element that
* can be used in the {#code char} array
* @return the Unicode code point at the given index
* @exception NullPointerException if {#code a} is null.
* @exception IndexOutOfBoundsException if the {#code index}
* argument is negative or not less than the {@code limit}
* argument, or if the {@code limit} argument is negative or
* greater than the length of the {@code char} array.
* @since 1.5
*/
// @ts-ignore
public static codePointAt(a: string[], index: number /*int*/, limit: number /*int*/): number /*int*/
/**
* Returns the code point preceding the given index of the
* {@code CharSequence}. If the {@code char} value at
* {@code (index - 1)} in the {@code CharSequence} is in
* the low-surrogate range, {@code (index - 2)} is not
* negative, and the {@code char} value at {@code (index - 2)}
* in the {@code CharSequence} is in the
* high-surrogate range, then the supplementary code point
* corresponding to this surrogate pair is returned. Otherwise,
* the {@code char} value at {@code (index - 1)} is
* returned.
* @param seq the {#code CharSequence} instance
* @param index the index following the code point that should be returned
* @return the Unicode code point value before the given index.
* @exception NullPointerException if {#code seq} is null.
* @exception IndexOutOfBoundsException if the {#code index}
* argument is less than 1 or greater than {@link
* CharSequence#length() seq.length()}.
* @since 1.5
*/
// @ts-ignore
public static codePointBefore(seq: java.lang.CharSequence, index: number /*int*/): number /*int*/
/**
* Returns the code point preceding the given index of the
* {@code char} array. If the {@code char} value at
* {@code (index - 1)} in the {@code char} array is in
* the low-surrogate range, {@code (index - 2)} is not
* negative, and the {@code char} value at {@code (index - 2)}
* in the {@code char} array is in the
* high-surrogate range, then the supplementary code point
* corresponding to this surrogate pair is returned. Otherwise,
* the {@code char} value at {@code (index - 1)} is
* returned.
* @param a the {#code char} array
* @param index the index following the code point that should be returned
* @return the Unicode code point value before the given index.
* @exception NullPointerException if {#code a} is null.
* @exception IndexOutOfBoundsException if the {#code index}
* argument is less than 1 or greater than the length of the
* {@code char} array
* @since 1.5
*/
// @ts-ignore
public static codePointBefore(a: string[], index: number /*int*/): number /*int*/
/**
* Returns the code point preceding the given index of the
* {@code char} array, where only array elements with
* {@code index} greater than or equal to {@code start}
* can be used. If the {@code char} value at {@code (index - 1)}
* in the {@code char} array is in the
* low-surrogate range, {@code (index - 2)} is not less than
* {@code start}, and the {@code char} value at
* {@code (index - 2)} in the {@code char} array is in
* the high-surrogate range, then the supplementary code point
* corresponding to this surrogate pair is returned. Otherwise,
* the {@code char} value at {@code (index - 1)} is
* returned.
* @param a the {#code char} array
* @param index the index following the code point that should be returned
* @param start the index of the first array element in the
* {#code char} array
* @return the Unicode code point value before the given index.
* @exception NullPointerException if {#code a} is null.
* @exception IndexOutOfBoundsException if the {#code index}
* argument is not greater than the {@code start} argument or
* is greater than the length of the {@code char} array, or
* if the {@code start} argument is negative or not less than
* the length of the {@code char} array.
* @since 1.5
*/
// @ts-ignore
public static codePointBefore(a: string[], index: number /*int*/, start: number /*int*/): number /*int*/
/**
* 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. If the specified character
* is not a
* supplementary character,
* an unspecified {@code char} is returned.
* If
* {@link #isSupplementaryCodePoint isSupplementaryCodePoint(x)}
* is {@code true}, then
* {@link #isHighSurrogate isHighSurrogate}{@code (highSurrogate(x))} and
* {@link #toCodePoint toCodePoint}{@code (highSurrogate(x), }{@link #lowSurrogate lowSurrogate}{@code (x)) == x}
* are also always {@code true}.
* @param codePoint a supplementary character (Unicode code point)
* @return the leading surrogate code unit used to represent the
* character in the UTF-16 encoding
* @since 1.7
*/
// @ts-ignore
public static highSurrogate(codePoint: number /*int*/): string
/**
* 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. If the specified character
* is not a
* supplementary character,
* an unspecified {@code char} is returned.
* If
* {@link #isSupplementaryCodePoint isSupplementaryCodePoint(x)}
* is {@code true}, then
* {@link #isLowSurrogate isLowSurrogate}{@code (lowSurrogate(x))} and
* {@link #toCodePoint toCodePoint}{@code (}{@link #highSurrogate highSurrogate}{@code (x), lowSurrogate(x)) == x}
* are also always {@code true}.
* @param codePoint a supplementary character (Unicode code point)
* @return the trailing surrogate code unit used to represent the
* character in the UTF-16 encoding
* @since 1.7
*/
// @ts-ignore
public static lowSurrogate(codePoint: number /*int*/): string
/**
* Converts the specified character (Unicode code point) to its
* UTF-16 representation. If the specified code point is a BMP
* (Basic Multilingual Plane or Plane 0) value, the same value is
* stored in {@code dst[dstIndex]}, and 1 is returned. If the
* specified code point is a supplementary character, its
* surrogate values are stored in {@code dst[dstIndex]}
* (high-surrogate) and {@code dst[dstIndex+1]}
* (low-surrogate), and 2 is returned.
* @param codePoint the character (Unicode code point) to be converted.
* @param dst an array of {#code char} in which the
* {@code codePoint}'s UTF-16 value is stored.
* @param dstIndex the start index into the {#code dst}
* array where the converted value is stored.
* @return 1 if the code point is a BMP code point, 2 if the
* code point is a supplementary code point.
* @exception IllegalArgumentException if the specified
* {#code codePoint} is not a valid Unicode code point.
* @exception NullPointerException if the specified {#code dst} is null.
* @exception IndexOutOfBoundsException if {#code dstIndex}
* is negative or not less than {@code dst.length}, or if
* {@code dst} at {@code dstIndex} doesn't have enough
* array element(s) to store the resulting {@code char}
* value(s). (If {@code dstIndex} is equal to
* {@code dst.length-1} and the specified
* {@code codePoint} is a supplementary character, the
* high-surrogate value is not stored in
* {@code dst[dstIndex]}.)
* @since 1.5
*/
// @ts-ignore
public static toChars(codePoint: number /*int*/, dst: string[], dstIndex: number /*int*/): number /*int*/
/**
* Converts the specified character (Unicode code point) to its
* UTF-16 representation stored in a {@code char} array. If
* the specified code point is a BMP (Basic Multilingual Plane or
* Plane 0) value, the resulting {@code char} array has
* the same value as {@code codePoint}. If the specified code
* point is a supplementary code point, the resulting
* {@code char} array has the corresponding surrogate pair.
* @param codePoint a Unicode code point
* @return a {#code char} array having
* {@code codePoint}'s UTF-16 representation.
* @exception IllegalArgumentException if the specified
* {#code codePoint} is not a valid Unicode code point.
* @since 1.5
*/
// @ts-ignore
public static toChars(codePoint: number /*int*/): string[]
/**
* Returns the number of Unicode code points in the text range of
* the specified char sequence. The text range begins at the
* specified {@code beginIndex} and extends to the
* {@code char} at index {@code endIndex - 1}. Thus the
* length (in {@code char}s) of the text range is
* {@code endIndex-beginIndex}. Unpaired surrogates within
* the text range count as one code point each.
* @param seq the char sequence
* @param beginIndex the index to the first {#code char} of
* the text range.
* @param endIndex the index after the last {#code char} of
* the text range.
* @return the number of Unicode code points in the specified text
* range
* @exception NullPointerException if {#code seq} is null.
* @exception IndexOutOfBoundsException if the
* {#code beginIndex} is negative, or {@code endIndex}
* is larger than the length of the given sequence, or
* {@code beginIndex} is larger than {@code endIndex}.
* @since 1.5
*/
// @ts-ignore
public static codePointCount(seq: java.lang.CharSequence, beginIndex: number /*int*/, endIndex: number /*int*/): number /*int*/
/**
* Returns the number of Unicode code points in a subarray of the
* {@code char} array argument. The {@code offset}
* argument is the index of the first {@code char} of the
* subarray and the {@code count} argument specifies the
* length of the subarray in {@code char}s. Unpaired
* surrogates within the subarray count as one code point each.
* @param a the {#code char} array
* @param offset the index of the first {#code char} in the
* given {@code char} array
* @param count the length of the subarray in {#code char}s
* @return the number of Unicode code points in the specified subarray
* @exception NullPointerException if {#code a} is null.
* @exception IndexOutOfBoundsException if {#code offset} or
* {@code count} is negative, or if {@code offset +
* count} is larger than the length of the given array.
* @since 1.5
*/
// @ts-ignore
public static codePointCount(a: string[], offset: number /*int*/, count: number /*int*/): number /*int*/
/**
* Returns the index within the given char sequence that is offset
* from the given {@code index} by {@code codePointOffset}
* code points. Unpaired surrogates within the text range given by
* {@code index} and {@code codePointOffset} count as
* one code point each.
* @param seq the char sequence
* @param index the index to be offset
* @param codePointOffset the offset in code points
* @return the index within the char sequence
* @exception NullPointerException if {#code seq} is null.
* @exception IndexOutOfBoundsException if {#code index}
* is negative or larger then the length of the char sequence,
* or if {@code codePointOffset} is positive and the
* subsequence starting with {@code index} has fewer than
* {@code codePointOffset} code points, or if
* {@code codePointOffset} is negative and the subsequence
* before {@code index} has fewer than the absolute value
* of {@code codePointOffset} code points.
* @since 1.5
*/
// @ts-ignore
public static offsetByCodePoints(seq: java.lang.CharSequence, index: number /*int*/, codePointOffset: number /*int*/): number /*int*/
/**
* Returns the index within the given {@code char} subarray
* that is offset from the given {@code index} by
* {@code codePointOffset} code points. The
* {@code start} and {@code count} arguments specify a
* subarray of the {@code char} array. Unpaired surrogates
* within the text range given by {@code index} and
* {@code codePointOffset} count as one code point each.
* @param a the {#code char} array
* @param start the index of the first {#code char} of the
* subarray
* @param count the length of the subarray in {#code char}s
* @param index the index to be offset
* @param codePointOffset the offset in code points
* @return the index within the subarray
* @exception NullPointerException if {#code a} is null.
* @exception IndexOutOfBoundsException
* if {#code start} or {@code count} is negative,
* or if {@code start + count} is larger than the length of
* the given array,
* or if {@code index} is less than {@code start} or
* larger then {@code start + count},
* or if {@code codePointOffset} is positive and the text range
* starting with {@code index} and ending with {@code start + count - 1}
* has fewer than {@code codePointOffset} code
* points,
* or if {@code codePointOffset} is negative and the text range
* starting with {@code start} and ending with {@code index - 1}
* has fewer than the absolute value of
* {@code codePointOffset} code points.
* @since 1.5
*/
// @ts-ignore
public static offsetByCodePoints(a: string[], start: number /*int*/, count: number /*int*/, index: number /*int*/, codePointOffset: number /*int*/): number /*int*/
/**
* Determines if the specified character is a lowercase character.
*
* A character is lowercase if its general category type, provided
* by {@code Character.getType(ch)}, is
* {@code LOWERCASE_LETTER}, or it has contributory property
* Other_Lowercase as defined by the Unicode Standard.
*
* The following are examples of lowercase characters:
* Many other Unicode characters are lowercase too.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isLowerCase(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character is lowercase;
* {@code false} otherwise.
* @see Character#isLowerCase(char)
* @see Character#isTitleCase(char)
* @see Character#toLowerCase(char)
* @see Character#getType(char)
*/
// @ts-ignore
public static isLowerCase(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) is a
* lowercase character.
*
* A character is lowercase if its general category type, provided
* by {@link Character#getType getType(codePoint)}, is
* {@code LOWERCASE_LETTER}, or it has contributory property
* Other_Lowercase as defined by the Unicode Standard.
*
* The following are examples of lowercase characters:
* Many other Unicode characters are lowercase too.
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character is lowercase;
* {@code false} otherwise.
* @see Character#isLowerCase(int)
* @see Character#isTitleCase(int)
* @see Character#toLowerCase(int)
* @see Character#getType(int)
* @since 1.5
*/
// @ts-ignore
public static isLowerCase(codePoint: number /*int*/): boolean
/**
* Determines if the specified character is an uppercase character.
*
* A character is uppercase if its general category type, provided by
* {@code Character.getType(ch)}, is {@code UPPERCASE_LETTER}.
* or it has contributory property Other_Uppercase as defined by the Unicode Standard.
*
* The following are examples of uppercase characters:
* Many other Unicode characters are uppercase too.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isUpperCase(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character is uppercase;
* {@code false} otherwise.
* @see Character#isLowerCase(char)
* @see Character#isTitleCase(char)
* @see Character#toUpperCase(char)
* @see Character#getType(char)
* @since 1.0
*/
// @ts-ignore
public static isUpperCase(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) is an uppercase character.
*
* A character is uppercase if its general category type, provided by
* {@link Character#getType(int) getType(codePoint)}, is {@code UPPERCASE_LETTER},
* or it has contributory property Other_Uppercase as defined by the Unicode Standard.
*
* The following are examples of uppercase characters:
* Many other Unicode characters are uppercase too.
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character is uppercase;
* {@code false} otherwise.
* @see Character#isLowerCase(int)
* @see Character#isTitleCase(int)
* @see Character#toUpperCase(int)
* @see Character#getType(int)
* @since 1.5
*/
// @ts-ignore
public static isUpperCase(codePoint: number /*int*/): boolean
/**
* Determines if the specified character is a titlecase character.
*
* A character is a titlecase character if its general
* category type, provided by {@code Character.getType(ch)},
* is {@code TITLECASE_LETTER}.
*
* Some characters look like pairs of Latin letters. For example, there
* is an uppercase letter that looks like "LJ" and has a corresponding
* lowercase letter that looks like "lj". A third form, which looks like "Lj",
* is the appropriate form to use when rendering a word in lowercase
* with initial capitals, as for a book title.
*
* These are some of the Unicode characters for which this method returns
* {@code true}:
* Many other Unicode characters are titlecase too.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isTitleCase(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character is titlecase;
* {@code false} otherwise.
* @see Character#isLowerCase(char)
* @see Character#isUpperCase(char)
* @see Character#toTitleCase(char)
* @see Character#getType(char)
* @since 1.0.2
*/
// @ts-ignore
public static isTitleCase(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) is a titlecase character.
*
* A character is a titlecase character if its general
* category type, provided by {@link Character#getType(int) getType(codePoint)},
* is {@code TITLECASE_LETTER}.
*
* Some characters look like pairs of Latin letters. For example, there
* is an uppercase letter that looks like "LJ" and has a corresponding
* lowercase letter that looks like "lj". A third form, which looks like "Lj",
* is the appropriate form to use when rendering a word in lowercase
* with initial capitals, as for a book title.
*
* These are some of the Unicode characters for which this method returns
* {@code true}:
* Many other Unicode characters are titlecase too.
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character is titlecase;
* {@code false} otherwise.
* @see Character#isLowerCase(int)
* @see Character#isUpperCase(int)
* @see Character#toTitleCase(int)
* @see Character#getType(int)
* @since 1.5
*/
// @ts-ignore
public static isTitleCase(codePoint: number /*int*/): boolean
/**
* Determines if the specified character is a digit.
*
* A character is a digit if its general category type, provided
* by {@code Character.getType(ch)}, is
* {@code DECIMAL_DIGIT_NUMBER}.
*
* Some Unicode character ranges that contain digits:
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isDigit(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character is a digit;
* {@code false} otherwise.
* @see Character#digit(char, int)
* @see Character#forDigit(int, int)
* @see Character#getType(char)
*/
// @ts-ignore
public static isDigit(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) is a digit.
*
* A character is a digit if its general category type, provided
* by {@link Character#getType(int) getType(codePoint)}, is
* {@code DECIMAL_DIGIT_NUMBER}.
*
* Some Unicode character ranges that contain digits:
*
* A character is defined if at least one of the following is true:
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isDefined(int)} method.
* @param ch the character to be tested
* @return {#code true} if the character has a defined meaning
* in Unicode; {@code false} otherwise.
* @see Character#isDigit(char)
* @see Character#isLetter(char)
* @see Character#isLetterOrDigit(char)
* @see Character#isLowerCase(char)
* @see Character#isTitleCase(char)
* @see Character#isUpperCase(char)
* @since 1.0.2
*/
// @ts-ignore
public static isDefined(ch: string): boolean
/**
* Determines if a character (Unicode code point) is defined in Unicode.
*
* A character is defined if at least one of the following is true:
*
* A character is considered to be a letter if its general
* category type, provided by {@code Character.getType(ch)},
* is any of the following:
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isLetter(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character is a letter;
* {@code false} otherwise.
* @see Character#isDigit(char)
* @see Character#isJavaIdentifierStart(char)
* @see Character#isJavaLetter(char)
* @see Character#isJavaLetterOrDigit(char)
* @see Character#isLetterOrDigit(char)
* @see Character#isLowerCase(char)
* @see Character#isTitleCase(char)
* @see Character#isUnicodeIdentifierStart(char)
* @see Character#isUpperCase(char)
*/
// @ts-ignore
public static isLetter(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) is a letter.
*
* A character is considered to be a letter if its general
* category type, provided by {@link Character#getType(int) getType(codePoint)},
* is any of the following:
*
* A character is considered to be a letter or digit if either
* {@code Character.isLetter(char ch)} or
* {@code Character.isDigit(char ch)} returns
* {@code true} for the character.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isLetterOrDigit(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character is a letter or digit;
* {@code false} otherwise.
* @see Character#isDigit(char)
* @see Character#isJavaIdentifierPart(char)
* @see Character#isJavaLetter(char)
* @see Character#isJavaLetterOrDigit(char)
* @see Character#isLetter(char)
* @see Character#isUnicodeIdentifierPart(char)
* @since 1.0.2
*/
// @ts-ignore
public static isLetterOrDigit(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) is a letter or digit.
*
* A character is considered to be a letter or digit if either
* {@link #isLetter(int) isLetter(codePoint)} or
* {@link #isDigit(int) isDigit(codePoint)} returns
* {@code true} for the character.
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character is a letter or digit;
* {@code false} otherwise.
* @see Character#isDigit(int)
* @see Character#isJavaIdentifierPart(int)
* @see Character#isLetter(int)
* @see Character#isUnicodeIdentifierPart(int)
* @since 1.5
*/
// @ts-ignore
public static isLetterOrDigit(codePoint: number /*int*/): boolean
/**
* Determines if the specified character is permissible as the first
* character in a Java identifier.
*
* A character may start a Java identifier if and only if
* one of the following is true:
*
* A character may be part of a Java identifier if and only if any
* of the following are true:
*
* A character is considered to be alphabetic if its general category type,
* provided by {@link Character#getType(int) getType(codePoint)}, is any of
* the following:
*
* A character may start a Java identifier if and only if
* one of the following conditions is true:
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isJavaIdentifierStart(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character may start a Java identifier;
* {@code false} otherwise.
* @see Character#isJavaIdentifierPart(char)
* @see Character#isLetter(char)
* @see Character#isUnicodeIdentifierStart(char)
* @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
* @since 1.1
*/
// @ts-ignore
public static isJavaIdentifierStart(ch: string): boolean
/**
* Determines if the character (Unicode code point) is
* permissible as the first character in a Java identifier.
*
* A character may start a Java identifier if and only if
* one of the following conditions is true:
*
* A character may be part of a Java identifier if any of the following
* are true:
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isJavaIdentifierPart(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character may be part of a
* Java identifier; {@code false} otherwise.
* @see Character#isIdentifierIgnorable(char)
* @see Character#isJavaIdentifierStart(char)
* @see Character#isLetterOrDigit(char)
* @see Character#isUnicodeIdentifierPart(char)
* @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
* @since 1.1
*/
// @ts-ignore
public static isJavaIdentifierPart(ch: string): boolean
/**
* Determines if the character (Unicode code point) may be part of a Java
* identifier as other than the first character.
*
* A character may be part of a Java identifier if any of the following
* are true:
*
* A character may start a Unicode identifier if and only if
* one of the following conditions is true:
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isUnicodeIdentifierStart(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character may start a Unicode
* identifier; {@code false} otherwise.
* @see Character#isJavaIdentifierStart(char)
* @see Character#isLetter(char)
* @see Character#isUnicodeIdentifierPart(char)
* @since 1.1
*/
// @ts-ignore
public static isUnicodeIdentifierStart(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) is permissible as the
* first character in a Unicode identifier.
*
* A character may start a Unicode identifier if and only if
* one of the following conditions is true:
*
* A character may be part of a Unicode identifier if and only if
* one of the following statements is true:
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isUnicodeIdentifierPart(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character may be part of a
* Unicode identifier; {@code false} otherwise.
* @see Character#isIdentifierIgnorable(char)
* @see Character#isJavaIdentifierPart(char)
* @see Character#isLetterOrDigit(char)
* @see Character#isUnicodeIdentifierStart(char)
* @since 1.1
*/
// @ts-ignore
public static isUnicodeIdentifierPart(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) may be part of a Unicode
* identifier as other than the first character.
*
* A character may be part of a Unicode identifier if and only if
* one of the following statements is true:
*
* The following Unicode characters are ignorable in a Java identifier
* or a Unicode identifier:
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isIdentifierIgnorable(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character is an ignorable control
* character that may be part of a Java or Unicode identifier;
* {@code false} otherwise.
* @see Character#isJavaIdentifierPart(char)
* @see Character#isUnicodeIdentifierPart(char)
* @since 1.1
*/
// @ts-ignore
public static isIdentifierIgnorable(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) should be regarded as
* an ignorable character in a Java identifier or a Unicode identifier.
*
* The following Unicode characters are ignorable in a Java identifier
* or a Unicode identifier:
*
* Note that
* {@code Character.isLowerCase(Character.toLowerCase(ch))}
* does not always return {@code true} for some ranges of
* characters, particularly those that are symbols or ideographs.
* In general, {@link String#toLowerCase()} should be used to map
* characters to lowercase. {@code String} case mapping methods
* have several benefits over {@code Character} case mapping methods.
* {@code String} case mapping methods can perform locale-sensitive
* mappings, context-sensitive mappings, and 1:M character mappings, whereas
* the {@code Character} case mapping methods cannot.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #toLowerCase(int)} method.
* @param ch the character to be converted.
* @return the lowercase equivalent of the character, if any;
* otherwise, the character itself.
* @see Character#isLowerCase(char)
* @see String#toLowerCase()
*/
// @ts-ignore
public static toLowerCase(ch: string): string
/**
* Converts the character (Unicode code point) argument to
* lowercase using case mapping information from the UnicodeData
* file.
* Note that
* {@code Character.isLowerCase(Character.toLowerCase(codePoint))}
* does not always return {@code true} for some ranges of
* characters, particularly those that are symbols or ideographs.
* In general, {@link String#toLowerCase()} should be used to map
* characters to lowercase. {@code String} case mapping methods
* have several benefits over {@code Character} case mapping methods.
* {@code String} case mapping methods can perform locale-sensitive
* mappings, context-sensitive mappings, and 1:M character mappings, whereas
* the {@code Character} case mapping methods cannot.
* @param codePoint the character (Unicode code point) to be converted.
* @return the lowercase equivalent of the character (Unicode code
* point), if any; otherwise, the character itself.
* @see Character#isLowerCase(int)
* @see String#toLowerCase()
* @since 1.5
*/
// @ts-ignore
public static toLowerCase(codePoint: number /*int*/): number /*int*/
/**
* Converts the character argument to uppercase using case mapping
* information from the UnicodeData file.
*
* Note that
* {@code Character.isUpperCase(Character.toUpperCase(ch))}
* does not always return {@code true} for some ranges of
* characters, particularly those that are symbols or ideographs.
* In general, {@link String#toUpperCase()} should be used to map
* characters to uppercase. {@code String} case mapping methods
* have several benefits over {@code Character} case mapping methods.
* {@code String} case mapping methods can perform locale-sensitive
* mappings, context-sensitive mappings, and 1:M character mappings, whereas
* the {@code Character} case mapping methods cannot.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #toUpperCase(int)} method.
* @param ch the character to be converted.
* @return the uppercase equivalent of the character, if any;
* otherwise, the character itself.
* @see Character#isUpperCase(char)
* @see String#toUpperCase()
*/
// @ts-ignore
public static toUpperCase(ch: string): string
/**
* Converts the character (Unicode code point) argument to
* uppercase using case mapping information from the UnicodeData
* file.
* Note that
* {@code Character.isUpperCase(Character.toUpperCase(codePoint))}
* does not always return {@code true} for some ranges of
* characters, particularly those that are symbols or ideographs.
* In general, {@link String#toUpperCase()} should be used to map
* characters to uppercase. {@code String} case mapping methods
* have several benefits over {@code Character} case mapping methods.
* {@code String} case mapping methods can perform locale-sensitive
* mappings, context-sensitive mappings, and 1:M character mappings, whereas
* the {@code Character} case mapping methods cannot.
* @param codePoint the character (Unicode code point) to be converted.
* @return the uppercase equivalent of the character, if any;
* otherwise, the character itself.
* @see Character#isUpperCase(int)
* @see String#toUpperCase()
* @since 1.5
*/
// @ts-ignore
public static toUpperCase(codePoint: number /*int*/): number /*int*/
/**
* Converts the character argument to titlecase using case mapping
* information from the UnicodeData file. If a character has no
* explicit titlecase mapping and is not itself a titlecase char
* according to UnicodeData, then the uppercase mapping is
* returned as an equivalent titlecase mapping. If the
* {@code char} argument is already a titlecase
* {@code char}, the same {@code char} value will be
* returned.
*
* Note that
* {@code Character.isTitleCase(Character.toTitleCase(ch))}
* does not always return {@code true} for some ranges of
* characters.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #toTitleCase(int)} method.
* @param ch the character to be converted.
* @return the titlecase equivalent of the character, if any;
* otherwise, the character itself.
* @see Character#isTitleCase(char)
* @see Character#toLowerCase(char)
* @see Character#toUpperCase(char)
* @since 1.0.2
*/
// @ts-ignore
public static toTitleCase(ch: string): string
/**
* Converts the character (Unicode code point) argument to titlecase using case mapping
* information from the UnicodeData file. If a character has no
* explicit titlecase mapping and is not itself a titlecase char
* according to UnicodeData, then the uppercase mapping is
* returned as an equivalent titlecase mapping. If the
* character argument is already a titlecase
* character, the same character value will be
* returned.
* Note that
* {@code Character.isTitleCase(Character.toTitleCase(codePoint))}
* does not always return {@code true} for some ranges of
* characters.
* @param codePoint the character (Unicode code point) to be converted.
* @return the titlecase equivalent of the character, if any;
* otherwise, the character itself.
* @see Character#isTitleCase(int)
* @see Character#toLowerCase(int)
* @see Character#toUpperCase(int)
* @since 1.5
*/
// @ts-ignore
public static toTitleCase(codePoint: number /*int*/): number /*int*/
/**
* Returns the numeric value of the character {@code ch} in the
* specified radix.
*
* If the radix is not in the range {@code MIN_RADIX} ≤
* {@code radix} ≤ {@code MAX_RADIX} or if the
* value of {@code ch} is not a valid digit in the specified
* radix, {@code -1} is returned. A character is a valid digit
* if at least one of the following is true:
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #digit(int, int)} method.
* @param ch the character to be converted.
* @param radix the radix.
* @return the numeric value represented by the character in the
* specified radix.
* @see Character#forDigit(int, int)
* @see Character#isDigit(char)
*/
// @ts-ignore
public static digit(ch: string, radix: number /*int*/): number /*int*/
/**
* Returns the numeric value of the specified character (Unicode
* code point) in the specified radix.
* If the radix is not in the range {@code MIN_RADIX} ≤
* {@code radix} ≤ {@code MAX_RADIX} or if the
* character is not a valid digit in the specified
* radix, {@code -1} is returned. A character is a valid digit
* if at least one of the following is true:
*
* The letters A-Z in their uppercase ({@code '\u0041'} through
* {@code '\u005A'}), lowercase
* ({@code '\u0061'} through {@code '\u007A'}), and
* full width variant ({@code '\uFF21'} through
* {@code '\uFF3A'} and {@code '\uFF41'} through
* {@code '\uFF5A'}) forms have numeric values from 10
* through 35. This is independent of the Unicode specification,
* which does not assign numeric values to these {@code char}
* values.
*
* If the character does not have a numeric value, then -1 is returned.
* If the character has a numeric value that cannot be represented as a
* nonnegative integer (for example, a fractional value), then -2
* is returned.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #getNumericValue(int)} method.
* @param ch the character to be converted.
* @return the numeric value of the character, as a nonnegative {#code int}
* value; -2 if the character has a numeric value that is not a
* nonnegative integer; -1 if the character has no numeric value.
* @see Character#forDigit(int, int)
* @see Character#isDigit(char)
* @since 1.1
*/
// @ts-ignore
public static getNumericValue(ch: string): number /*int*/
/**
* Returns the {@code int} value that the specified
* character (Unicode code point) represents. For example, the character
* {@code '\u216C'} (the Roman numeral fifty) will return
* an {@code int} with a value of 50.
*
* The letters A-Z in their uppercase ({@code '\u0041'} through
* {@code '\u005A'}), lowercase
* ({@code '\u0061'} through {@code '\u007A'}), and
* full width variant ({@code '\uFF21'} through
* {@code '\uFF3A'} and {@code '\uFF41'} through
* {@code '\uFF5A'}) forms have numeric values from 10
* through 35. This is independent of the Unicode specification,
* which does not assign numeric values to these {@code char}
* values.
*
* If the character does not have a numeric value, then -1 is returned.
* If the character has a numeric value that cannot be represented as a
* nonnegative integer (for example, a fractional value), then -2
* is returned.
* @param codePoint the character (Unicode code point) to be converted.
* @return the numeric value of the character, as a nonnegative {#code int}
* value; -2 if the character has a numeric value that is not a
* nonnegative integer; -1 if the character has no numeric value.
* @see Character#forDigit(int, int)
* @see Character#isDigit(int)
* @since 1.5
*/
// @ts-ignore
public static getNumericValue(codePoint: number /*int*/): number /*int*/
/**
* Determines if the specified character is ISO-LATIN-1 white space.
* This method returns {@code true} for the following five
* characters only:
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isSpaceChar(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character is a space character;
* {@code false} otherwise.
* @see Character#isWhitespace(char)
* @since 1.1
*/
// @ts-ignore
public static isSpaceChar(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) is a
* Unicode space character. A character is considered to be a
* space character if and only if it is specified to be a space
* character by the Unicode Standard. This method returns true if
* the character's general category type is any of the following:
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isWhitespace(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character is a Java whitespace
* character; {@code false} otherwise.
* @see Character#isSpaceChar(char)
* @since 1.1
*/
// @ts-ignore
public static isWhitespace(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) is
* white space according to Java. A character is a Java
* whitespace character if and only if it satisfies one of the
* following criteria:
*
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character is a Java whitespace
* character; {@code false} otherwise.
* @see Character#isSpaceChar(int)
* @since 1.5
*/
// @ts-ignore
public static isWhitespace(codePoint: number /*int*/): boolean
/**
* Determines if the specified character is an ISO control
* character. A character is considered to be an ISO control
* character if its code is in the range {@code '\u0000'}
* through {@code '\u001F'} or in the range
* {@code '\u007F'} through {@code '\u009F'}.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isISOControl(int)} method.
* @param ch the character to be tested.
* @return {#code true} if the character is an ISO control character;
* {@code false} otherwise.
* @see Character#isSpaceChar(char)
* @see Character#isWhitespace(char)
* @since 1.1
*/
// @ts-ignore
public static isISOControl(ch: string): boolean
/**
* Determines if the referenced character (Unicode code point) is an ISO control
* character. A character is considered to be an ISO control
* character if its code is in the range {@code '\u0000'}
* through {@code '\u001F'} or in the range
* {@code '\u007F'} through {@code '\u009F'}.
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character is an ISO control character;
* {@code false} otherwise.
* @see Character#isSpaceChar(int)
* @see Character#isWhitespace(int)
* @since 1.5
*/
// @ts-ignore
public static isISOControl(codePoint: number /*int*/): boolean
/**
* Returns a value indicating a character's general category.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #getType(int)} method.
* @param ch the character to be tested.
* @return a value of type {#code int} representing the
* character's general category.
* @see Character#COMBINING_SPACING_MARK
* @see Character#CONNECTOR_PUNCTUATION
* @see Character#CONTROL
* @see Character#CURRENCY_SYMBOL
* @see Character#DASH_PUNCTUATION
* @see Character#DECIMAL_DIGIT_NUMBER
* @see Character#ENCLOSING_MARK
* @see Character#END_PUNCTUATION
* @see Character#FINAL_QUOTE_PUNCTUATION
* @see Character#FORMAT
* @see Character#INITIAL_QUOTE_PUNCTUATION
* @see Character#LETTER_NUMBER
* @see Character#LINE_SEPARATOR
* @see Character#LOWERCASE_LETTER
* @see Character#MATH_SYMBOL
* @see Character#MODIFIER_LETTER
* @see Character#MODIFIER_SYMBOL
* @see Character#NON_SPACING_MARK
* @see Character#OTHER_LETTER
* @see Character#OTHER_NUMBER
* @see Character#OTHER_PUNCTUATION
* @see Character#OTHER_SYMBOL
* @see Character#PARAGRAPH_SEPARATOR
* @see Character#PRIVATE_USE
* @see Character#SPACE_SEPARATOR
* @see Character#START_PUNCTUATION
* @see Character#SURROGATE
* @see Character#TITLECASE_LETTER
* @see Character#UNASSIGNED
* @see Character#UPPERCASE_LETTER
* @since 1.1
*/
// @ts-ignore
public static getType(ch: string): number /*int*/
/**
* Returns a value indicating a character's general category.
* @param codePoint the character (Unicode code point) to be tested.
* @return a value of type {#code int} representing the
* character's general category.
* @see Character#COMBINING_SPACING_MARK COMBINING_SPACING_MARK
* @see Character#CONNECTOR_PUNCTUATION CONNECTOR_PUNCTUATION
* @see Character#CONTROL CONTROL
* @see Character#CURRENCY_SYMBOL CURRENCY_SYMBOL
* @see Character#DASH_PUNCTUATION DASH_PUNCTUATION
* @see Character#DECIMAL_DIGIT_NUMBER DECIMAL_DIGIT_NUMBER
* @see Character#ENCLOSING_MARK ENCLOSING_MARK
* @see Character#END_PUNCTUATION END_PUNCTUATION
* @see Character#FINAL_QUOTE_PUNCTUATION FINAL_QUOTE_PUNCTUATION
* @see Character#FORMAT FORMAT
* @see Character#INITIAL_QUOTE_PUNCTUATION INITIAL_QUOTE_PUNCTUATION
* @see Character#LETTER_NUMBER LETTER_NUMBER
* @see Character#LINE_SEPARATOR LINE_SEPARATOR
* @see Character#LOWERCASE_LETTER LOWERCASE_LETTER
* @see Character#MATH_SYMBOL MATH_SYMBOL
* @see Character#MODIFIER_LETTER MODIFIER_LETTER
* @see Character#MODIFIER_SYMBOL MODIFIER_SYMBOL
* @see Character#NON_SPACING_MARK NON_SPACING_MARK
* @see Character#OTHER_LETTER OTHER_LETTER
* @see Character#OTHER_NUMBER OTHER_NUMBER
* @see Character#OTHER_PUNCTUATION OTHER_PUNCTUATION
* @see Character#OTHER_SYMBOL OTHER_SYMBOL
* @see Character#PARAGRAPH_SEPARATOR PARAGRAPH_SEPARATOR
* @see Character#PRIVATE_USE PRIVATE_USE
* @see Character#SPACE_SEPARATOR SPACE_SEPARATOR
* @see Character#START_PUNCTUATION START_PUNCTUATION
* @see Character#SURROGATE SURROGATE
* @see Character#TITLECASE_LETTER TITLECASE_LETTER
* @see Character#UNASSIGNED UNASSIGNED
* @see Character#UPPERCASE_LETTER UPPERCASE_LETTER
* @since 1.5
*/
// @ts-ignore
public static getType(codePoint: number /*int*/): number /*int*/
/**
* Determines the character representation for a specific digit in
* the specified radix. If the value of {@code radix} is not a
* valid radix, or the value of {@code digit} is not a valid
* digit in the specified radix, the null character
* ({@code '\u0000'}) is returned.
*
* The {@code radix} argument is valid if it is greater than or
* equal to {@code MIN_RADIX} and less than or equal to
* {@code MAX_RADIX}. The {@code digit} argument is valid if
* {@code 0 <= digit < radix}.
*
* If the digit is less than 10, then
* {@code '0' + digit} is returned. Otherwise, the value
* {@code 'a' + digit - 10} is returned.
* @param digit the number to convert to a character.
* @param radix the radix.
* @return the {#code char} representation of the specified digit
* in the specified radix.
* @see Character#MIN_RADIX
* @see Character#MAX_RADIX
* @see Character#digit(char, int)
*/
// @ts-ignore
public static forDigit(digit: number /*int*/, radix: number /*int*/): string
/**
* Returns the Unicode directionality property for the given
* character. Character directionality is used to calculate the
* visual ordering of text. The directionality value of undefined
* {@code char} values is {@code DIRECTIONALITY_UNDEFINED}.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #getDirectionality(int)} method.
* @param ch {#code char} for which the directionality property
* is requested.
* @return the directionality property of the {#code char} value.
* @see Character#DIRECTIONALITY_UNDEFINED
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
* @see Character#DIRECTIONALITY_ARABIC_NUMBER
* @see Character#DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
* @see Character#DIRECTIONALITY_NONSPACING_MARK
* @see Character#DIRECTIONALITY_BOUNDARY_NEUTRAL
* @see Character#DIRECTIONALITY_PARAGRAPH_SEPARATOR
* @see Character#DIRECTIONALITY_SEGMENT_SEPARATOR
* @see Character#DIRECTIONALITY_WHITESPACE
* @see Character#DIRECTIONALITY_OTHER_NEUTRALS
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
* @see Character#DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
* @since 1.4
*/
// @ts-ignore
public static getDirectionality(ch: string): number /*byte*/
/**
* Returns the Unicode directionality property for the given
* character (Unicode code point). Character directionality is
* used to calculate the visual ordering of text. The
* directionality value of undefined character is {@link
* #DIRECTIONALITY_UNDEFINED}.
* @param codePoint the character (Unicode code point) for which
* the directionality property is requested.
* @return the directionality property of the character.
* @see Character#DIRECTIONALITY_UNDEFINED DIRECTIONALITY_UNDEFINED
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT DIRECTIONALITY_LEFT_TO_RIGHT
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT DIRECTIONALITY_RIGHT_TO_LEFT
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER DIRECTIONALITY_EUROPEAN_NUMBER
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
* @see Character#DIRECTIONALITY_ARABIC_NUMBER DIRECTIONALITY_ARABIC_NUMBER
* @see Character#DIRECTIONALITY_COMMON_NUMBER_SEPARATOR DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
* @see Character#DIRECTIONALITY_NONSPACING_MARK DIRECTIONALITY_NONSPACING_MARK
* @see Character#DIRECTIONALITY_BOUNDARY_NEUTRAL DIRECTIONALITY_BOUNDARY_NEUTRAL
* @see Character#DIRECTIONALITY_PARAGRAPH_SEPARATOR DIRECTIONALITY_PARAGRAPH_SEPARATOR
* @see Character#DIRECTIONALITY_SEGMENT_SEPARATOR DIRECTIONALITY_SEGMENT_SEPARATOR
* @see Character#DIRECTIONALITY_WHITESPACE DIRECTIONALITY_WHITESPACE
* @see Character#DIRECTIONALITY_OTHER_NEUTRALS DIRECTIONALITY_OTHER_NEUTRALS
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
* @see Character#DIRECTIONALITY_POP_DIRECTIONAL_FORMAT DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
* @since 1.5
*/
// @ts-ignore
public static getDirectionality(codePoint: number /*int*/): number /*byte*/
/**
* Determines whether the character is mirrored according to the
* Unicode specification. Mirrored characters should have their
* glyphs horizontally mirrored when displayed in text that is
* right-to-left. For example, {@code '\u0028'} LEFT
* PARENTHESIS is semantically defined to be an opening
* parenthesis. This will appear as a "(" in text that is
* left-to-right but as a ")" in text that is right-to-left.
* Note: This method cannot handle supplementary characters. To support
* all Unicode characters, including supplementary characters, use
* the {@link #isMirrored(int)} method.
* @param ch {#code char} for which the mirrored property is requested
* @return {#code true} if the char is mirrored, {@code false}
* if the {@code char} is not mirrored or is not defined.
* @since 1.4
*/
// @ts-ignore
public static isMirrored(ch: string): boolean
/**
* Determines whether the specified character (Unicode code point)
* is mirrored according to the Unicode specification. Mirrored
* characters should have their glyphs horizontally mirrored when
* displayed in text that is right-to-left. For example,
* {@code '\u0028'} LEFT PARENTHESIS is semantically
* defined to be an opening parenthesis. This will appear
* as a "(" in text that is left-to-right but as a ")" in text
* that is right-to-left.
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character is mirrored, {@code false}
* if the character is not mirrored or is not defined.
* @since 1.5
*/
// @ts-ignore
public static isMirrored(codePoint: number /*int*/): boolean
/**
* Compares two {@code Character} objects numerically.
* @param anotherCharacter the {#code Character} to be compared.
* @return the value {#code 0} if the argument {@code Character}
* is equal to this {@code Character}; a value less than
* {@code 0} if this {@code Character} is numerically less
* than the {@code Character} argument; and a value greater than
* {@code 0} if this {@code Character} is numerically greater
* than the {@code Character} argument (unsigned comparison).
* Note that this is strictly a numerical comparison; it is not
* locale-dependent.
* @since 1.2
*/
// @ts-ignore
public compareTo(anotherCharacter: java.lang.Character): number /*int*/
/**
* Compares two {@code char} values numerically.
* The value returned is identical to what would be returned by:
*
* Note: if the specified character is not assigned a name by
* the UnicodeData file (part of the Unicode Character
* Database maintained by the Unicode Consortium), the returned
* name is the same as the result of expression.
*
* @param high the high-surrogate code value to be tested
* @param low the low-surrogate code value to be tested
* @return {#code true} if the specified high and
* low-surrogate code values represent a valid surrogate pair;
* {@code false} otherwise.
* @since 1.5
*/
// @ts-ignore
public static isSurrogatePair(high: string, low: string): boolean
/**
* Determines the number of {@code char} values needed to
* represent the specified character (Unicode code point). If the
* specified character is equal to or greater than 0x10000, then
* the method returns 2. Otherwise, the method returns 1.
* {@code
* isHighSurrogate(high) && isLowSurrogate(low)
* }
*
* a b c d e f g h i j k l m n o p q r s t u v w x y z
* '\u00DF' '\u00E0' '\u00E1' '\u00E2' '\u00E3' '\u00E4' '\u00E5' '\u00E6'
* '\u00E7' '\u00E8' '\u00E9' '\u00EA' '\u00EB' '\u00EC' '\u00ED' '\u00EE'
* '\u00EF' '\u00F0' '\u00F1' '\u00F2' '\u00F3' '\u00F4' '\u00F5' '\u00F6'
* '\u00F8' '\u00F9' '\u00FA' '\u00FB' '\u00FC' '\u00FD' '\u00FE' '\u00FF'
*
*
* a b c d e f g h i j k l m n o p q r s t u v w x y z
* '\u00DF' '\u00E0' '\u00E1' '\u00E2' '\u00E3' '\u00E4' '\u00E5' '\u00E6'
* '\u00E7' '\u00E8' '\u00E9' '\u00EA' '\u00EB' '\u00EC' '\u00ED' '\u00EE'
* '\u00EF' '\u00F0' '\u00F1' '\u00F2' '\u00F3' '\u00F4' '\u00F5' '\u00F6'
* '\u00F8' '\u00F9' '\u00FA' '\u00FB' '\u00FC' '\u00FD' '\u00FE' '\u00FF'
*
*
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
* '\u00C0' '\u00C1' '\u00C2' '\u00C3' '\u00C4' '\u00C5' '\u00C6' '\u00C7'
* '\u00C8' '\u00C9' '\u00CA' '\u00CB' '\u00CC' '\u00CD' '\u00CE' '\u00CF'
* '\u00D0' '\u00D1' '\u00D2' '\u00D3' '\u00D4' '\u00D5' '\u00D6' '\u00D8'
* '\u00D9' '\u00DA' '\u00DB' '\u00DC' '\u00DD' '\u00DE'
*
*
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
* '\u00C0' '\u00C1' '\u00C2' '\u00C3' '\u00C4' '\u00C5' '\u00C6' '\u00C7'
* '\u00C8' '\u00C9' '\u00CA' '\u00CB' '\u00CC' '\u00CD' '\u00CE' '\u00CF'
* '\u00D0' '\u00D1' '\u00D2' '\u00D3' '\u00D4' '\u00D5' '\u00D6' '\u00D8'
* '\u00D9' '\u00DA' '\u00DB' '\u00DC' '\u00DD' '\u00DE'
*
*
*
*
*
*
* Many other character ranges contain digits as well.
*
*
* Many other character ranges contain digits as well.
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character is a digit;
* {@code false} otherwise.
* @see Character#forDigit(int, int)
* @see Character#getType(int)
* @since 1.5
*/
// @ts-ignore
public static isDigit(codePoint: number /*int*/): boolean
/**
* Determines if a character is defined in Unicode.
*
*
*
*
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character has a defined meaning
* in Unicode; {@code false} otherwise.
* @see Character#isDigit(int)
* @see Character#isLetter(int)
* @see Character#isLetterOrDigit(int)
* @see Character#isLowerCase(int)
* @see Character#isTitleCase(int)
* @see Character#isUpperCase(int)
* @since 1.5
*/
// @ts-ignore
public static isDefined(codePoint: number /*int*/): boolean
/**
* Determines if the specified character is a letter.
*
*
* Not all letters have case. Many characters are
* letters but are neither uppercase nor lowercase nor titlecase.
*
*
* Not all letters have case. Many characters are
* letters but are neither uppercase nor lowercase nor titlecase.
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character is a letter;
* {@code false} otherwise.
* @see Character#isDigit(int)
* @see Character#isJavaIdentifierStart(int)
* @see Character#isLetterOrDigit(int)
* @see Character#isLowerCase(int)
* @see Character#isTitleCase(int)
* @see Character#isUnicodeIdentifierStart(int)
* @see Character#isUpperCase(int)
* @since 1.5
*/
// @ts-ignore
public static isLetter(codePoint: number /*int*/): boolean
/**
* Determines if the specified character is a letter or digit.
*
*
* @param ch the character to be tested.
* @return {#code true} if the character may start a Java
* identifier; {@code false} otherwise.
* @see Character#isJavaLetterOrDigit(char)
* @see Character#isJavaIdentifierStart(char)
* @see Character#isJavaIdentifierPart(char)
* @see Character#isLetter(char)
* @see Character#isLetterOrDigit(char)
* @see Character#isUnicodeIdentifierStart(char)
* @since 1.02
* @deprecated Replaced by isJavaIdentifierStart(char).
*/
// @ts-ignore
public static isJavaLetter(ch: string): boolean
/**
* Determines if the specified character may be part of a Java
* identifier as other than the first character.
*
*
* @param ch the character to be tested.
* @return {#code true} if the character may be part of a
* Java identifier; {@code false} otherwise.
* @see Character#isJavaLetter(char)
* @see Character#isJavaIdentifierStart(char)
* @see Character#isJavaIdentifierPart(char)
* @see Character#isLetter(char)
* @see Character#isLetterOrDigit(char)
* @see Character#isUnicodeIdentifierPart(char)
* @see Character#isIdentifierIgnorable(char)
* @since 1.02
* @deprecated Replaced by isJavaIdentifierPart(char).
*/
// @ts-ignore
public static isJavaLetterOrDigit(ch: string): boolean
/**
* Determines if the specified character (Unicode code point) is an alphabet.
*
*
* or it has contributory property Other_Alphabetic as defined by the
* Unicode Standard.
* @param codePoint the character (Unicode code point) to be tested.
* @return UPPERCASE_LETTER
* LOWERCASE_LETTER
* TITLECASE_LETTER
* MODIFIER_LETTER
* OTHER_LETTER
* LETTER_NUMBER
* true
if the character is a Unicode alphabet
* character, false
otherwise.
* @since 1.7
*/
// @ts-ignore
public static isAlphabetic(codePoint: number /*int*/): boolean
/**
* Determines if the specified character (Unicode code point) is a CJKV
* (Chinese, Japanese, Korean and Vietnamese) ideograph, as defined by
* the Unicode Standard.
* @param codePoint the character (Unicode code point) to be tested.
* @return true
if the character is a Unicode ideograph
* character, false
otherwise.
* @since 1.7
*/
// @ts-ignore
public static isIdeographic(codePoint: number /*int*/): boolean
/**
* Determines if the specified character is
* permissible as the first character in a Java identifier.
*
*
*
*
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character may start a Java identifier;
* {@code false} otherwise.
* @see Character#isJavaIdentifierPart(int)
* @see Character#isLetter(int)
* @see Character#isUnicodeIdentifierStart(int)
* @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
* @since 1.5
*/
// @ts-ignore
public static isJavaIdentifierStart(codePoint: number /*int*/): boolean
/**
* Determines if the specified character may be part of a Java
* identifier as other than the first character.
*
*
*
*
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character may be part of a
* Java identifier; {@code false} otherwise.
* @see Character#isIdentifierIgnorable(int)
* @see Character#isJavaIdentifierStart(int)
* @see Character#isLetterOrDigit(int)
* @see Character#isUnicodeIdentifierPart(int)
* @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
* @since 1.5
*/
// @ts-ignore
public static isJavaIdentifierPart(codePoint: number /*int*/): boolean
/**
* Determines if the specified character is permissible as the
* first character in a Unicode identifier.
*
*
*
*
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character may start a Unicode
* identifier; {@code false} otherwise.
* @see Character#isJavaIdentifierStart(int)
* @see Character#isLetter(int)
* @see Character#isUnicodeIdentifierPart(int)
* @since 1.5
*/
// @ts-ignore
public static isUnicodeIdentifierStart(codePoint: number /*int*/): boolean
/**
* Determines if the specified character may be part of a Unicode
* identifier as other than the first character.
*
*
*
*
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character may be part of a
* Unicode identifier; {@code false} otherwise.
* @see Character#isIdentifierIgnorable(int)
* @see Character#isJavaIdentifierPart(int)
* @see Character#isLetterOrDigit(int)
* @see Character#isUnicodeIdentifierStart(int)
* @since 1.5
*/
// @ts-ignore
public static isUnicodeIdentifierPart(codePoint: number /*int*/): boolean
/**
* Determines if the specified character should be regarded as
* an ignorable character in a Java identifier or a Unicode identifier.
*
*
*
*
*
*
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character is an ignorable control
* character that may be part of a Java or Unicode identifier;
* {@code false} otherwise.
* @see Character#isJavaIdentifierPart(int)
* @see Character#isUnicodeIdentifierPart(int)
* @since 1.5
*/
// @ts-ignore
public static isIdentifierIgnorable(codePoint: number /*int*/): boolean
/**
* Converts the character argument to lowercase using case
* mapping information from the UnicodeData file.
*
*
*
*
*
*
* @param codePoint the character (Unicode code point) to be converted.
* @param radix the radix.
* @return the numeric value represented by the character in the
* specified radix.
* @see Character#forDigit(int, int)
* @see Character#isDigit(int)
* @since 1.5
*/
// @ts-ignore
public static digit(codePoint: number /*int*/, radix: number /*int*/): number /*int*/
/**
* Returns the {@code int} value that the specified Unicode
* character represents. For example, the character
* {@code '\u216C'} (the roman numeral fifty) will return
* an int with a value of 50.
*
*
* @param ch the character to be tested.
* @return {#code true} if the character is ISO-LATIN-1 white
* space; {@code false} otherwise.
* @see Character#isSpaceChar(char)
* @see Character#isWhitespace(char)
* @deprecated Replaced by isWhitespace(char).
*/
// @ts-ignore
public static isSpace(ch: string): boolean
/**
* Determines if the specified character is a Unicode space character.
* A character is considered to be a space character if and only if
* it is specified to be a space character by the Unicode Standard. This
* method returns true if the character's general category type is any of
* the following:
*
* {@code '\t'} {@code U+0009}
* {@code HORIZONTAL TABULATION}
* {@code '\n'} {@code U+000A}
* {@code NEW LINE}
* {@code '\f'} {@code U+000C}
* {@code FORM FEED}
* {@code '\r'} {@code U+000D}
* {@code CARRIAGE RETURN}
* {@code ' '} {@code U+0020}
* {@code SPACE}
*
*
*
* @param codePoint the character (Unicode code point) to be tested.
* @return {#code true} if the character is a space character;
* {@code false} otherwise.
* @see Character#isWhitespace(int)
* @since 1.5
*/
// @ts-ignore
public static isSpaceChar(codePoint: number /*int*/): boolean
/**
* Determines if the specified character is white space according to Java.
* A character is a Java whitespace character if and only if it satisfies
* one of the following criteria:
*
*
*
*
*
* Character.valueOf(x).compareTo(Character.valueOf(y))
*
* @param x the first {#code char} to compare
* @param y the second {#code char} to compare
* @return the value {#code 0} if {@code x == y};
* a value less than {@code 0} if {@code x < y}; and
* a value greater than {@code 0} if {@code x > y}
* @since 1.7
*/
// @ts-ignore
public static compare(x: string, y: string): number /*int*/
/**
* Returns the value obtained by reversing the order of the bytes in the
* specified char value.
* @param ch The {#code char} of which to reverse the byte order.
* @return the value obtained by reversing (or, equivalently, swapping)
* the bytes in the specified char value.
* @since 1.5
*/
// @ts-ignore
public static reverseBytes(ch: string): string
/**
* Returns the Unicode name of the specified character
* {@code codePoint}, or null if the code point is
* {@link #UNASSIGNED unassigned}.
* {@code
* Character.UnicodeBlock.of(codePoint).toString().replace('_', ' ')
* + " "
* + Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
* }
* @param codePoint the character (Unicode code point)
* @return the Unicode name of the specified character, or null if
* the code point is unassigned.
* @exception IllegalArgumentException if the specified
* {#code codePoint} is not a valid Unicode
* code point.
* @since 1.7
*/
// @ts-ignore
public static getName(codePoint: number /*int*/): string
}
}
}