toChar

open override fun toChar(): Char(source)

Deprecated

Warning since 1.5

Error since 2.3

Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.

Replace with

this.toInt().toChar()

Converts this Byte value to Char.

If this value is non-negative, the resulting Char code is equal to this value.

The least significant 8 bits of the resulting Char code are the same as the bits of this Byte value, whereas the most significant 8 bits are filled with the sign bit of this value.

Since Kotlin

1.0
open override fun toChar(): Char(source)

Deprecated

Warning since 1.5

Error since 2.3

Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.

Replace with

this.toInt().toChar()

Converts this Byte value to Char.

If this value is non-negative, the resulting Char code is equal to this value.

The least significant 8 bits of the resulting Char code are the same as the bits of this Byte value, whereas the most significant 8 bits are filled with the sign bit of this value.

Since Kotlin

1.1
open external override fun toChar(): Char(source)

Deprecated

Warning since 1.5

Error since 2.3

Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.

Replace with

this.toInt().toChar()

Converts this Byte value to Char.

If this value is non-negative, the resulting Char code is equal to this value.

The least significant 8 bits of the resulting Char code are the same as the bits of this Byte value, whereas the most significant 8 bits are filled with the sign bit of this value.

Since Kotlin

1.3
open override fun toChar(): Char(source)

Deprecated

Warning since 1.5

Error since 2.3

Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.

Replace with

this.toInt().toChar()

Converts this Byte value to Char.

If this value is non-negative, the resulting Char code is equal to this value.

The least significant 8 bits of the resulting Char code are the same as the bits of this Byte value, whereas the most significant 8 bits are filled with the sign bit of this value.

Since Kotlin

1.8
open override fun toChar(): Char(source)

Deprecated

Warning since 1.5

Error since 2.3

Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.

Replace with

this.toInt().toChar()

Converts this Byte value to Char.

If this value is non-negative, the resulting Char code is equal to this value.

The least significant 8 bits of the resulting Char code are the same as the bits of this Byte value, whereas the most significant 8 bits are filled with the sign bit of this value.

Since Kotlin

1.8