kotlin.Char
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
.
Functions
fun compareTo(other: Char): Int Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if its less than other, or a positive number if its greater than other. | |
operator fun dec(): Char Decrements this value. | |
operator fun inc(): Char Increments this value. | |
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 plus(other: Int): Char Adds the other Int value to this value resulting a Char. | |
operator fun rangeTo(other: Char): CharRange Creates a range from this value to the specified other value. | |
fun toByte(): Byte Returns the value of this character as a | |
fun toChar(): Char Returns the value of this character as a | |
fun toDouble(): Double Returns the value of this character as a | |
fun toFloat(): Float Returns the value of this character as a | |
fun toInt(): Int Returns the value of this character as a | |
fun toLong(): Long Returns the value of this character as a | |
fun toShort(): Short Returns the value of this character as a |
Companion Object Properties
const val MAX_HIGH_SURROGATE: Char The maximum value of a Unicode high-surrogate code unit. | |
const val MAX_LOW_SURROGATE: Char The maximum value of a Unicode low-surrogate code unit. | |
const val MAX_SURROGATE: Char The maximum value of a Unicode surrogate code unit. | |
const val MIN_HIGH_SURROGATE: Char The minimum value of a Unicode high-surrogate code unit. | |
const val MIN_LOW_SURROGATE: Char The minimum value of a Unicode low-surrogate code unit. | |
const val MIN_SURROGATE: Char The minimum value of a Unicode surrogate code unit. |
Extension Properties
val Char.category: CharCategory Returns a value indicating a character's general category. | |
val Char.directionality: CharDirectionality Returns the Unicode directionality property for the given character. |
Extension Functions
infix fun Char.downTo(to: Char): CharProgression Returns a progression from this value down to the specified to value with the step -1. | |
fun Char.equals( other: Char, ignoreCase: Boolean = false ): Boolean Returns | |
fun Char.isDefined(): Boolean Returns | |
fun Char.isDigit(): Boolean Returns | |
fun Char.isHighSurrogate(): Boolean Returns | |
fun Char.isISOControl(): Boolean Returns | |
fun Char.isIdentifierIgnorable(): Boolean Returns | |
fun Char.isJavaIdentifierPart(): Boolean Returns | |
fun Char.isJavaIdentifierStart(): Boolean Returns | |
fun Char.isLetter(): Boolean Returns | |
fun Char.isLetterOrDigit(): Boolean Returns | |
fun Char.isLowSurrogate(): Boolean Returns | |
fun Char.isLowerCase(): Boolean Returns | |
fun Char.isSurrogate(): Boolean Returns | |
fun Char.isTitleCase(): Boolean Returns | |
fun Char.isUpperCase(): Boolean Returns | |
fun Char.isWhitespace(): Boolean Determines whether a character is whitespace according to the Unicode standard. Returns | |
operator fun Char.plus(other: String): String Concatenates this Char and a String. | |
fun Char.toLowerCase(): Char Converts this character to lowercase. | |
fun Char.toTitleCase(): Char Converts this character to titlecase. | |
fun Char.toUpperCase(): Char Converts this character to uppercase. | |
infix fun Char.until(to: Char): CharRange Returns a range from this value up to but excluding the specified to value. |
© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char/