Char

Represents a 16-bit Unicode character.

On the JVM, non-nullable values of this type are represented as values of the primitive type char.

Since Kotlin

1.0

Represents a 16-bit Unicode character.

On the JVM, non-nullable values of this type are represented as values of the primitive type char.

Since Kotlin

1.1

Types

Link copied to clipboard
object Companion
Since Kotlin 1.0
object Companion
Since Kotlin 1.1

Functions

Link copied to clipboard
open operator override fun compareTo(other: Char): Int

Compares this value with the specified value for order.

Since Kotlin 1.0
open operator override fun compareTo(other: Char): Int

Compares this value with the specified value for order.

Since Kotlin 1.1
Link copied to clipboard
operator fun dec(): Char

Returns this value decremented by one.

Since Kotlin 1.0
operator fun dec(): Char

Returns this value decremented by one.

Since Kotlin 1.1
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.0
open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.1
Link copied to clipboard
operator fun inc(): Char

Returns this value incremented by one.

Since Kotlin 1.0
operator fun inc(): Char

Returns this value incremented by one.

Since Kotlin 1.1
Link copied to clipboard
operator fun minus(other: Char): Int

Subtracts the other Char value from this value resulting an Int.

Since Kotlin 1.0
operator fun minus(other: Int): Char

Subtracts the other Int value from this value resulting a Char.

Since Kotlin 1.0
operator fun minus(other: Char): Int

Subtracts the other Char value from this value resulting an Int.

Since Kotlin 1.1
operator fun minus(other: Int): Char

Subtracts the other Int value from this value resulting a Char.

Since Kotlin 1.1
Link copied to clipboard
operator fun plus(other: Int): Char

Adds the other Int value to this value resulting a Char.

Since Kotlin 1.0
operator fun plus(other: Int): Char

Adds the other Int value to this value resulting a Char.

Since Kotlin 1.1
Link copied to clipboard
operator fun rangeTo(other: Char): CharRange

Creates a range from this value to the specified other value.

Since Kotlin 1.0
operator fun rangeTo(other: Char): CharRange

Creates a range from this value to the specified other value.

Since Kotlin 1.1
Link copied to clipboard
fun toByte(): Byte

Returns the value of this character as a Byte.

Since Kotlin 1.0
fun toByte(): Byte

Returns the value of this character as a Byte.

Since Kotlin 1.1
Link copied to clipboard
fun toChar(): Char

Returns the value of this character as a Char.

Since Kotlin 1.0
fun toChar(): Char

Returns the value of this character as a Char.

Since Kotlin 1.1
Link copied to clipboard

Returns the value of this character as a Double.

Since Kotlin 1.0

Returns the value of this character as a Double.

Since Kotlin 1.1
Link copied to clipboard
fun toFloat(): Float

Returns the value of this character as a Float.

Since Kotlin 1.0
fun toFloat(): Float

Returns the value of this character as a Float.

Since Kotlin 1.1
Link copied to clipboard
fun toInt(): Int

Returns the value of this character as a Int.

Since Kotlin 1.0
fun toInt(): Int

Returns the value of this character as a Int.

Since Kotlin 1.1
Link copied to clipboard
fun toLong(): Long

Returns the value of this character as a Long.

Since Kotlin 1.0
fun toLong(): Long

Returns the value of this character as a Long.

Since Kotlin 1.1
Link copied to clipboard
fun toShort(): Short

Returns the value of this character as a Short.

Since Kotlin 1.0
fun toShort(): Short

Returns the value of this character as a Short.

Since Kotlin 1.1
Link copied to clipboard
open override fun toString(): String
Since Kotlin 1.0
open override fun toString(): String
Since Kotlin 1.1

Extensions

Link copied to clipboard

Returns the Unicode directionality property for the given character.

Since Kotlin 1.0
Link copied to clipboard

Returns true if this character (Unicode code point) should be regarded as an ignorable character in a Java identifier or a Unicode identifier.

Since Kotlin 1.0
Link copied to clipboard

Returns true if this character (Unicode code point) may be part of a Java identifier as other than the first character.

Since Kotlin 1.0
Link copied to clipboard

Returns true if this character is permissible as the first character in a Java identifier.

Since Kotlin 1.0
Link copied to clipboard
inline fun Char.toTitleCase(): Char
inline fun Char.toTitleCase(): Char

Converts this character to title case using Unicode mapping rules of the invariant locale.

Since Kotlin 1.0