Char

class Char : Comparable<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.

class Char : Comparable<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.

class Char : Comparable<Char>

Represents a 16-bit Unicode character.

Types

Link copied to clipboard
object Companion
object Companion
object Companion

Functions

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

Compares this value with the specified value for order.

open operator override fun compareTo(other: Char): Int

Compares this value with the specified value for order.

open operator external override fun compareTo(other: Char): Int

Compares this value with the specified value for order.

Link copied to clipboard
operator fun dec(): Char

Decrements this value.

operator fun dec(): Char

Decrements this value.

operator external fun dec(): Char

Decrements this value.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
fun equals(other: Char): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
operator fun inc(): Char

Increments this value.

operator fun inc(): Char

Increments this value.

operator external fun inc(): Char

Increments this value.

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

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

operator fun minus(other: Int): Char

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

operator fun minus(other: Char): Int

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

operator fun minus(other: Int): Char

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

inline operator fun minus(other: Char): Int

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

inline operator fun minus(other: Int): Char

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

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

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

operator fun plus(other: Int): Char

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

inline operator fun plus(other: Int): Char

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

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

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

operator fun rangeTo(other: Char): CharRange

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

operator fun rangeTo(other: Char): CharRange

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

Link copied to clipboard
fun toByte(): Byte

Returns the value of this character as a Byte.

fun toByte(): Byte

Returns the value of this character as a Byte.

external fun toByte(): Byte

Returns the value of this character as a Byte.

Link copied to clipboard
fun toChar(): Char

Returns the value of this character as a Char.

fun toChar(): Char

Returns the value of this character as a Char.

inline fun toChar(): Char

Returns the value of this character as a Char.

Link copied to clipboard

Returns the value of this character as a Double.

Returns the value of this character as a Double.

external fun toDouble(): Double

Returns the value of this character as a Double.

Link copied to clipboard
fun toFloat(): Float

Returns the value of this character as a Float.

fun toFloat(): Float

Returns the value of this character as a Float.

external fun toFloat(): Float

Returns the value of this character as a Float.

Link copied to clipboard
fun toInt(): Int

Returns the value of this character as a Int.

fun toInt(): Int

Returns the value of this character as a Int.

external fun toInt(): Int

Returns the value of this character as a Int.

Link copied to clipboard
fun toLong(): Long

Returns the value of this character as a Long.

fun toLong(): Long

Returns the value of this character as a Long.

external fun toLong(): Long

Returns the value of this character as a Long.

Link copied to clipboard
fun toShort(): Short

Returns the value of this character as a Short.

fun toShort(): Short

Returns the value of this character as a Short.

external fun toShort(): Short

Returns the value of this character as a Short.

Link copied to clipboard
open external override fun toString(): String

Extensions

Link copied to clipboard

Returns the Unicode general category of this character.

Returns the Unicode general category of this character.

Returns the Unicode general category of this character.

Returns the Unicode general category of this character.

Link copied to clipboard

Returns the code of this Char.

Link copied to clipboard

Returns the numeric value of the decimal digit that this Char represents. Throws an exception if this Char is not a valid decimal digit.

fun Char.digitToInt(radix: Int): Int
fun Char.digitToInt(radix: Int): Int
fun Char.digitToInt(radix: Int): Int

Returns the numeric value of the digit that this Char represents in the specified radix. Throws an exception if the radix is not in the range 2..36 or if this Char is not a valid digit in the specified radix.

Link copied to clipboard

Returns the numeric value of the decimal digit that this Char represents, or null if this Char is not a valid decimal digit.

Returns the numeric value of the digit that this Char represents in the specified radix, or null if this Char is not a valid digit in the specified radix. Throws an exception if the radix is not in the range 2..36.

Link copied to clipboard

Returns the Unicode directionality property for the given character.

Link copied to clipboard

Returns a progression from this value down to the specified to value with the step -1.

Link copied to clipboard
fun Char.equals(other: Char, ignoreCase: Boolean = false): Boolean
fun Char.equals(other: Char, ignoreCase: Boolean = false): Boolean
fun Char.equals(other: Char, ignoreCase: Boolean = false): Boolean

Returns true if this character is equal to the other character, optionally ignoring character case.

Link copied to clipboard
expect fun Char.isDefined(): Boolean
expect fun Char.isDefined(): Boolean
expect fun Char.isDefined(): Boolean

Returns true if this character (Unicode code point) is defined in Unicode.

actual inline fun Char.isDefined(): Boolean
actual inline fun Char.isDefined(): Boolean
actual inline fun Char.isDefined(): Boolean

Returns true if this character (Unicode code point) is defined in Unicode.

actual fun Char.isDefined(): Boolean
actual fun Char.isDefined(): Boolean
actual fun Char.isDefined(): Boolean

Returns true if this character (Unicode code point) is defined in Unicode.

actual fun Char.isDefined(): Boolean
actual fun Char.isDefined(): Boolean
actual fun Char.isDefined(): Boolean

Returns true if this character (Unicode code point) is defined in Unicode.

Link copied to clipboard
expect fun Char.isDigit(): Boolean
expect fun Char.isDigit(): Boolean
expect fun Char.isDigit(): Boolean

Returns true if this character is a digit.

actual inline fun Char.isDigit(): Boolean
actual inline fun Char.isDigit(): Boolean
actual inline fun Char.isDigit(): Boolean

Returns true if this character is a digit.

actual fun Char.isDigit(): Boolean
actual fun Char.isDigit(): Boolean
actual fun Char.isDigit(): Boolean

Returns true if this character is a digit.

actual fun Char.isDigit(): Boolean
actual fun Char.isDigit(): Boolean
actual fun Char.isDigit(): Boolean

Returns true if this character is a digit.

Link copied to clipboard
actual inline fun Char.isHighSurrogate(): Boolean
actual inline fun Char.isHighSurrogate(): Boolean
actual inline fun Char.isHighSurrogate(): Boolean

Returns true if this character is a Unicode high-surrogate code unit (also known as leading-surrogate code unit).

actual fun Char.isHighSurrogate(): Boolean
actual fun Char.isHighSurrogate(): Boolean
actual fun Char.isHighSurrogate(): Boolean

Returns true if this character is a Unicode high-surrogate code unit (also known as leading-surrogate code unit).

actual external fun Char.isHighSurrogate(): Boolean
actual external fun Char.isHighSurrogate(): Boolean
actual external fun Char.isHighSurrogate(): Boolean

Returns true if this character is a Unicode high-surrogate code unit (also known as leading-surrogate code unit).

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.

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

Link copied to clipboard
expect fun Char.isISOControl(): Boolean
expect fun Char.isISOControl(): Boolean
expect fun Char.isISOControl(): Boolean

Returns true if this character is an ISO control character.

actual inline fun Char.isISOControl(): Boolean
actual inline fun Char.isISOControl(): Boolean
actual inline fun Char.isISOControl(): Boolean

Returns true if this character is an ISO control character.

actual fun Char.isISOControl(): Boolean
actual fun Char.isISOControl(): Boolean
actual fun Char.isISOControl(): Boolean

Returns true if this character is an ISO control character.

actual external fun Char.isISOControl(): Boolean
actual external fun Char.isISOControl(): Boolean
actual external fun Char.isISOControl(): Boolean

Returns true if this character is an ISO control character.

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.

Link copied to clipboard

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

Link copied to clipboard
expect fun Char.isLetter(): Boolean
expect fun Char.isLetter(): Boolean
expect fun Char.isLetter(): Boolean

Returns true if this character is a letter.

actual inline fun Char.isLetter(): Boolean
actual inline fun Char.isLetter(): Boolean
actual inline fun Char.isLetter(): Boolean

Returns true if this character is a letter.

actual fun Char.isLetter(): Boolean
actual fun Char.isLetter(): Boolean
actual fun Char.isLetter(): Boolean

Returns true if this character is a letter.

actual fun Char.isLetter(): Boolean
actual fun Char.isLetter(): Boolean
actual fun Char.isLetter(): Boolean

Returns true if this character is a letter.

Link copied to clipboard

Returns true if this character is a letter or digit.

actual inline fun Char.isLetterOrDigit(): Boolean
actual inline fun Char.isLetterOrDigit(): Boolean
actual inline fun Char.isLetterOrDigit(): Boolean

Returns true if this character is a letter or digit.

actual fun Char.isLetterOrDigit(): Boolean
actual fun Char.isLetterOrDigit(): Boolean
actual fun Char.isLetterOrDigit(): Boolean

Returns true if this character is a letter or digit.

Returns true if this character is a letter or digit.

Link copied to clipboard
expect fun Char.isLowerCase(): Boolean
expect fun Char.isLowerCase(): Boolean
expect fun Char.isLowerCase(): Boolean

Returns true if this character is a lower case letter.

actual inline fun Char.isLowerCase(): Boolean
actual inline fun Char.isLowerCase(): Boolean
actual inline fun Char.isLowerCase(): Boolean

Returns true if this character is lower case.

actual fun Char.isLowerCase(): Boolean
actual fun Char.isLowerCase(): Boolean
actual fun Char.isLowerCase(): Boolean

Returns true if this character is a lower case letter.

actual fun Char.isLowerCase(): Boolean
actual fun Char.isLowerCase(): Boolean
actual fun Char.isLowerCase(): Boolean

Returns true if this character is a lower case letter.

Link copied to clipboard
actual inline fun Char.isLowSurrogate(): Boolean
actual inline fun Char.isLowSurrogate(): Boolean
actual inline fun Char.isLowSurrogate(): Boolean

Returns true if this character is a Unicode low-surrogate code unit (also known as trailing-surrogate code unit).

actual fun Char.isLowSurrogate(): Boolean
actual fun Char.isLowSurrogate(): Boolean
actual fun Char.isLowSurrogate(): Boolean

Returns true if this character is a Unicode low-surrogate code unit (also known as trailing-surrogate code unit).

actual external fun Char.isLowSurrogate(): Boolean
actual external fun Char.isLowSurrogate(): Boolean
actual external fun Char.isLowSurrogate(): Boolean

Returns true if this character is a Unicode low-surrogate code unit (also known as trailing-surrogate code unit).

Link copied to clipboard

Returns true if this character is a Unicode surrogate code unit.

Link copied to clipboard
expect fun Char.isTitleCase(): Boolean
expect fun Char.isTitleCase(): Boolean
expect fun Char.isTitleCase(): Boolean

Returns true if this character is a title case letter.

actual inline fun Char.isTitleCase(): Boolean
actual inline fun Char.isTitleCase(): Boolean
actual inline fun Char.isTitleCase(): Boolean

Returns true if this character is a title case letter.

actual fun Char.isTitleCase(): Boolean
actual fun Char.isTitleCase(): Boolean
actual fun Char.isTitleCase(): Boolean

Returns true if this character is a title case letter.

actual fun Char.isTitleCase(): Boolean
actual fun Char.isTitleCase(): Boolean
actual fun Char.isTitleCase(): Boolean

Returns true if this character is a title case letter.

Link copied to clipboard
expect fun Char.isUpperCase(): Boolean
expect fun Char.isUpperCase(): Boolean
expect fun Char.isUpperCase(): Boolean

Returns true if this character is an upper case letter.

actual inline fun Char.isUpperCase(): Boolean
actual inline fun Char.isUpperCase(): Boolean
actual inline fun Char.isUpperCase(): Boolean

Returns true if this character is upper case.

actual fun Char.isUpperCase(): Boolean
actual fun Char.isUpperCase(): Boolean
actual fun Char.isUpperCase(): Boolean

Returns true if this character is an upper case letter.

actual fun Char.isUpperCase(): Boolean
actual fun Char.isUpperCase(): Boolean
actual fun Char.isUpperCase(): Boolean

Returns true if this character is an upper case letter.

Link copied to clipboard
expect fun Char.isWhitespace(): Boolean
expect fun Char.isWhitespace(): Boolean
expect fun Char.isWhitespace(): Boolean

Determines whether a character is whitespace according to the Unicode standard. Returns true if the character is whitespace.

actual fun Char.isWhitespace(): Boolean
actual fun Char.isWhitespace(): Boolean
actual fun Char.isWhitespace(): Boolean

Determines whether a character is whitespace according to the Unicode standard. Returns true if the character is whitespace.

actual fun Char.isWhitespace(): Boolean
actual fun Char.isWhitespace(): Boolean
actual fun Char.isWhitespace(): Boolean

Determines whether a character is whitespace according to the Unicode standard. Returns true if the character is whitespace.

actual fun Char.isWhitespace(): Boolean
actual fun Char.isWhitespace(): Boolean
actual fun Char.isWhitespace(): Boolean

Determines whether a character is whitespace according to the Unicode standard. Returns true if the character is whitespace.

Link copied to clipboard
expect fun Char.lowercase(): String
expect fun Char.lowercase(): String
expect fun Char.lowercase(): String

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

fun Char.lowercase(locale: Locale): String
fun Char.lowercase(locale: Locale): String
fun Char.lowercase(locale: Locale): String

Converts this character to lower case using Unicode mapping rules of the specified locale.

actual inline fun Char.lowercase(): String
actual inline fun Char.lowercase(): String
actual inline fun Char.lowercase(): String

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

actual inline fun Char.lowercase(): String
actual inline fun Char.lowercase(): String
actual inline fun Char.lowercase(): String

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

actual fun Char.lowercase(): String
actual fun Char.lowercase(): String
actual fun Char.lowercase(): String

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

Link copied to clipboard
expect fun Char.lowercaseChar(): Char
expect fun Char.lowercaseChar(): Char
expect fun Char.lowercaseChar(): Char

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

actual inline fun Char.lowercaseChar(): Char
actual inline fun Char.lowercaseChar(): Char
actual inline fun Char.lowercaseChar(): Char

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

actual inline fun Char.lowercaseChar(): Char
actual inline fun Char.lowercaseChar(): Char
actual inline fun Char.lowercaseChar(): Char

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

actual fun Char.lowercaseChar(): Char
actual fun Char.lowercaseChar(): Char
actual fun Char.lowercaseChar(): Char

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

Link copied to clipboard
inline operator fun Char.plus(other: String): String
inline operator fun Char.plus(other: String): String
inline operator fun Char.plus(other: String): String

Concatenates this Char and a String.

Link copied to clipboard

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

fun Char.titlecase(locale: Locale): String
fun Char.titlecase(locale: Locale): String
fun Char.titlecase(locale: Locale): String

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

Link copied to clipboard
expect fun Char.titlecaseChar(): Char
expect fun Char.titlecaseChar(): Char
expect fun Char.titlecaseChar(): Char

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

actual inline fun Char.titlecaseChar(): Char
actual inline fun Char.titlecaseChar(): Char
actual inline fun Char.titlecaseChar(): Char

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

actual fun Char.titlecaseChar(): Char
actual fun Char.titlecaseChar(): Char
actual fun Char.titlecaseChar(): Char

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

actual fun Char.titlecaseChar(): Char
actual fun Char.titlecaseChar(): Char
actual fun Char.titlecaseChar(): Char

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

Link copied to clipboard
expect fun Char.toLowerCase(): Char
expect fun Char.toLowerCase(): Char
expect fun Char.toLowerCase(): Char

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

actual inline fun Char.toLowerCase(): Char
actual inline fun Char.toLowerCase(): Char
actual inline fun Char.toLowerCase(): Char

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

actual inline fun Char.toLowerCase(): Char
actual inline fun Char.toLowerCase(): Char
actual inline fun Char.toLowerCase(): Char

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

actual fun Char.toLowerCase(): Char
actual fun Char.toLowerCase(): Char
actual fun Char.toLowerCase(): Char

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

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

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

Link copied to clipboard
expect fun Char.toUpperCase(): Char
expect fun Char.toUpperCase(): Char
expect fun Char.toUpperCase(): Char

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

actual inline fun Char.toUpperCase(): Char
actual inline fun Char.toUpperCase(): Char
actual inline fun Char.toUpperCase(): Char

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

actual inline fun Char.toUpperCase(): Char
actual inline fun Char.toUpperCase(): Char
actual inline fun Char.toUpperCase(): Char

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

actual fun Char.toUpperCase(): Char
actual fun Char.toUpperCase(): Char
actual fun Char.toUpperCase(): Char

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

Link copied to clipboard
infix fun Char.until(to: Char): CharRange
infix fun Char.until(to: Char): CharRange
infix fun Char.until(to: Char): CharRange

Returns a range from this value up to but excluding the specified to value.

Link copied to clipboard
expect fun Char.uppercase(): String
expect fun Char.uppercase(): String
expect fun Char.uppercase(): String

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

fun Char.uppercase(locale: Locale): String
fun Char.uppercase(locale: Locale): String
fun Char.uppercase(locale: Locale): String

Converts this character to upper case using Unicode mapping rules of the specified locale.

actual inline fun Char.uppercase(): String
actual inline fun Char.uppercase(): String
actual inline fun Char.uppercase(): String

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

actual inline fun Char.uppercase(): String
actual inline fun Char.uppercase(): String
actual inline fun Char.uppercase(): String

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

actual fun Char.uppercase(): String
actual fun Char.uppercase(): String
actual fun Char.uppercase(): String

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

Link copied to clipboard
expect fun Char.uppercaseChar(): Char
expect fun Char.uppercaseChar(): Char
expect fun Char.uppercaseChar(): Char

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

actual inline fun Char.uppercaseChar(): Char
actual inline fun Char.uppercaseChar(): Char
actual inline fun Char.uppercaseChar(): Char

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

actual fun Char.uppercaseChar(): Char
actual fun Char.uppercaseChar(): Char
actual fun Char.uppercaseChar(): Char

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

actual fun Char.uppercaseChar(): Char
actual fun Char.uppercaseChar(): Char
actual fun Char.uppercaseChar(): Char

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