CharCategory

enum class CharCategory (source)

Platform and version requirements: JVM

Represents the character general category in the Unicode specification.

Enum Values

UNASSIGNED

General category "Cn" in the Unicode specification.

UPPERCASE_LETTER

General category "Lu" in the Unicode specification.

LOWERCASE_LETTER

General category "Ll" in the Unicode specification.

TITLECASE_LETTER

General category "Lt" in the Unicode specification.

MODIFIER_LETTER

General category "Lm" in the Unicode specification.

OTHER_LETTER

General category "Lo" in the Unicode specification.

NON_SPACING_MARK

General category "Mn" in the Unicode specification.

ENCLOSING_MARK

General category "Me" in the Unicode specification.

COMBINING_SPACING_MARK

General category "Mc" in the Unicode specification.

DECIMAL_DIGIT_NUMBER

General category "Nd" in the Unicode specification.

LETTER_NUMBER

General category "Nl" in the Unicode specification.

OTHER_NUMBER

General category "No" in the Unicode specification.

SPACE_SEPARATOR

General category "Zs" in the Unicode specification.

LINE_SEPARATOR

General category "Zl" in the Unicode specification.

PARAGRAPH_SEPARATOR

General category "Zp" in the Unicode specification.

CONTROL

General category "Cc" in the Unicode specification.

FORMAT

General category "Cf" in the Unicode specification.

PRIVATE_USE

General category "Co" in the Unicode specification.

SURROGATE

General category "Cs" in the Unicode specification.

DASH_PUNCTUATION

General category "Pd" in the Unicode specification.

START_PUNCTUATION

General category "Ps" in the Unicode specification.

END_PUNCTUATION

General category "Pe" in the Unicode specification.

CONNECTOR_PUNCTUATION

General category "Pc" in the Unicode specification.

OTHER_PUNCTUATION

General category "Po" in the Unicode specification.

MATH_SYMBOL

General category "Sm" in the Unicode specification.

CURRENCY_SYMBOL

General category "Sc" in the Unicode specification.

MODIFIER_SYMBOL

General category "Sk" in the Unicode specification.

OTHER_SYMBOL

General category "So" in the Unicode specification.

INITIAL_QUOTE_PUNCTUATION

General category "Pi" in the Unicode specification.

FINAL_QUOTE_PUNCTUATION

General category "Pf" in the Unicode specification.

Properties

code

val code: String

value

val value: Int

Inherited Properties

name

val name: String

Returns the name of this enum constant, exactly as declared in its enum declaration.

ordinal

val ordinal: Int

Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).

Functions

contains

operator fun contains(char: Char): Boolean

Returns true if char character belongs to this category.

Inherited Functions

clone

fun clone(): Any

Throws an exception since enum constants cannot be cloned. This method prevents enum classes from inheriting from Cloneable.

compareTo

fun compareTo(other: E): Int

Compares this object with the specified object for order. Returns zero if this object is equal to the specified other object, a negative number if it's less than other, or a positive number if it's greater than other.

equals

fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements:

hashCode

fun hashCode(): Int

Returns a hash code value for the object. The general contract of hashCode is:

toString

open fun toString(): String

Returns a string representation of the object.

Companion Object Functions

valueOf

fun valueOf(category: Int): CharCategory