CharCategory

Common
JVM
JS
Native
1.0

Represents the character general category in the Unicode specification.

Enum Values

Common
JVM
JS
Native
1.0

UNASSIGNED

General category "Cn" in the Unicode specification.

Common
JVM
JS
Native
1.0

UPPERCASE_LETTER

General category "Lu" in the Unicode specification.

Common
JVM
JS
Native
1.0

LOWERCASE_LETTER

General category "Ll" in the Unicode specification.

Common
JVM
JS
Native
1.0

TITLECASE_LETTER

General category "Lt" in the Unicode specification.

Common
JVM
JS
Native
1.0

MODIFIER_LETTER

General category "Lm" in the Unicode specification.

Common
JVM
JS
Native
1.0

OTHER_LETTER

General category "Lo" in the Unicode specification.

Common
JVM
JS
Native
1.0

NON_SPACING_MARK

General category "Mn" in the Unicode specification.

Common
JVM
JS
Native
1.0

ENCLOSING_MARK

General category "Me" in the Unicode specification.

Common
JVM
JS
Native
1.0

COMBINING_SPACING_MARK

General category "Mc" in the Unicode specification.

Common
JVM
JS
Native
1.0

DECIMAL_DIGIT_NUMBER

General category "Nd" in the Unicode specification.

Common
JVM
JS
Native
1.0

LETTER_NUMBER

General category "Nl" in the Unicode specification.

Common
JVM
JS
Native
1.0

OTHER_NUMBER

General category "No" in the Unicode specification.

Common
JVM
JS
Native
1.0

SPACE_SEPARATOR

General category "Zs" in the Unicode specification.

Common
JVM
JS
Native
1.0

LINE_SEPARATOR

General category "Zl" in the Unicode specification.

Common
JVM
JS
Native
1.0

PARAGRAPH_SEPARATOR

General category "Zp" in the Unicode specification.

Common
JVM
JS
Native
1.0

CONTROL

General category "Cc" in the Unicode specification.

Common
JVM
JS
Native
1.0

FORMAT

General category "Cf" in the Unicode specification.

Common
JVM
JS
Native
1.0

PRIVATE_USE

General category "Co" in the Unicode specification.

Common
JVM
JS
Native
1.0

SURROGATE

General category "Cs" in the Unicode specification.

Common
JVM
JS
Native
1.0

DASH_PUNCTUATION

General category "Pd" in the Unicode specification.

Common
JVM
JS
Native
1.0

START_PUNCTUATION

General category "Ps" in the Unicode specification.

Common
JVM
JS
Native
1.0

END_PUNCTUATION

General category "Pe" in the Unicode specification.

Common
JVM
JS
Native
1.0

CONNECTOR_PUNCTUATION

General category "Pc" in the Unicode specification.

Common
JVM
JS
Native
1.0

OTHER_PUNCTUATION

General category "Po" in the Unicode specification.

Common
JVM
JS
Native
1.0

MATH_SYMBOL

General category "Sm" in the Unicode specification.

Common
JVM
JS
Native
1.0

CURRENCY_SYMBOL

General category "Sc" in the Unicode specification.

Common
JVM
JS
Native
1.0

MODIFIER_SYMBOL

General category "Sk" in the Unicode specification.

Common
JVM
JS
Native
1.0

OTHER_SYMBOL

General category "So" in the Unicode specification.

Common
JVM
JS
Native
1.0

INITIAL_QUOTE_PUNCTUATION

General category "Pi" in the Unicode specification.

Common
JVM
JS
Native
1.0

FINAL_QUOTE_PUNCTUATION

General category "Pf" in the Unicode specification.

Properties

Common
JVM
JS
Native
1.0

code

Two-letter code of this general category in the Unicode specification.

val code: String
JVM
1.0

value

val value: Int

Functions

Common
JVM
JS
Native
1.0

contains

Returns true if char character belongs to this category.

operator fun contains(char: Char): Boolean

Companion Object Functions

JVM
1.0

valueOf

Returns the CharCategory corresponding to the specified category that represents a Java general category constant.

fun valueOf(category: Int): CharCategory

Extension Properties

JVM
1.7

declaringJavaClass

Returns a Java Class instance of the enum the given constant belongs to.

val <E : Enum<E>> Enum<E>.declaringJavaClass: Class<E>

Extension Functions

Common
JVM
JS
Native
1.0

coerceAtLeast

Ensures that this value is not less than the specified minimumValue.

fun <T : Comparable<T>> T.coerceAtLeast(minimumValue: T): T
Common
JVM
JS
Native
1.0

coerceAtMost

Ensures that this value is not greater than the specified maximumValue.

fun <T : Comparable<T>> T.coerceAtMost(maximumValue: T): T
Common
JVM
JS
Native
1.0

coerceIn

Ensures that this value lies in the specified range minimumValue..maximumValue.

fun <T : Comparable<T>> T.coerceIn(
    minimumValue: T?,
    maximumValue: T?
): T

Ensures that this value lies in the specified range.

fun <T : Comparable<T>> T.coerceIn(
    range: ClosedFloatingPointRange<T>
): T
fun <T : Comparable<T>> T.coerceIn(range: ClosedRange<T>): T
Common
JVM
JS
Native
1.6

compareTo

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.

infix fun <T> Comparable<T>.compareTo(other: T): Int
Common
JVM
JS
Native
1.0

rangeTo

Creates a range from this Comparable value to the specified that value.

operator fun <T : Comparable<T>> T.rangeTo(
    that: T
): ClosedRange<T>
Common
JVM
JS
Native
1.9

rangeUntil

Creates an open-ended range from this Comparable value to the specified that value.

operator fun <T : Comparable<T>> T.rangeUntil(
    that: T
): OpenEndRange<T>

Inheritors

Common
JVM
JS
Native
1.0

COMBINING_SPACING_MARK

General category "Mc" in the Unicode specification.

Common
JVM
JS
Native
1.0

CONNECTOR_PUNCTUATION

General category "Pc" in the Unicode specification.

Common
JVM
JS
Native
1.0

CONTROL

General category "Cc" in the Unicode specification.

Common
JVM
JS
Native
1.0

CURRENCY_SYMBOL

General category "Sc" in the Unicode specification.

Common
JVM
JS
Native
1.0

DASH_PUNCTUATION

General category "Pd" in the Unicode specification.

Common
JVM
JS
Native
1.0

DECIMAL_DIGIT_NUMBER

General category "Nd" in the Unicode specification.

Common
JVM
JS
Native
1.0

ENCLOSING_MARK

General category "Me" in the Unicode specification.

Common
JVM
JS
Native
1.0

END_PUNCTUATION

General category "Pe" in the Unicode specification.

Common
JVM
JS
Native
1.0

FINAL_QUOTE_PUNCTUATION

General category "Pf" in the Unicode specification.

Common
JVM
JS
Native
1.0

FORMAT

General category "Cf" in the Unicode specification.

Common
JVM
JS
Native
1.0

INITIAL_QUOTE_PUNCTUATION

General category "Pi" in the Unicode specification.

Common
JVM
JS
Native
1.0

LETTER_NUMBER

General category "Nl" in the Unicode specification.

Common
JVM
JS
Native
1.0

LINE_SEPARATOR

General category "Zl" in the Unicode specification.

Common
JVM
JS
Native
1.0

LOWERCASE_LETTER

General category "Ll" in the Unicode specification.

Common
JVM
JS
Native
1.0

MATH_SYMBOL

General category "Sm" in the Unicode specification.

Common
JVM
JS
Native
1.0

MODIFIER_LETTER

General category "Lm" in the Unicode specification.

Common
JVM
JS
Native
1.0

MODIFIER_SYMBOL

General category "Sk" in the Unicode specification.

Common
JVM
JS
Native
1.0

NON_SPACING_MARK

General category "Mn" in the Unicode specification.

Common
JVM
JS
Native
1.0

OTHER_LETTER

General category "Lo" in the Unicode specification.

Common
JVM
JS
Native
1.0

OTHER_NUMBER

General category "No" in the Unicode specification.

Common
JVM
JS
Native
1.0

OTHER_PUNCTUATION

General category "Po" in the Unicode specification.

Common
JVM
JS
Native
1.0

OTHER_SYMBOL

General category "So" in the Unicode specification.

Common
JVM
JS
Native
1.0

PARAGRAPH_SEPARATOR

General category "Zp" in the Unicode specification.

Common
JVM
JS
Native
1.0

PRIVATE_USE

General category "Co" in the Unicode specification.

Common
JVM
JS
Native
1.0

SPACE_SEPARATOR

General category "Zs" in the Unicode specification.

Common
JVM
JS
Native
1.0

START_PUNCTUATION

General category "Ps" in the Unicode specification.

Common
JVM
JS
Native
1.0

SURROGATE

General category "Cs" in the Unicode specification.

Common
JVM
JS
Native
1.0

TITLECASE_LETTER

General category "Lt" in the Unicode specification.

Common
JVM
JS
Native
1.0

UNASSIGNED

General category "Cn" in the Unicode specification.

Common
JVM
JS
Native
1.0

UPPERCASE_LETTER

General category "Lu" in the Unicode specification.