Straighten Char-to-code and Char-to-digit conversions out #KT-23451

This commit is contained in:
Abduqodiri Qurbonzoda
2020-12-08 11:51:16 +03:00
parent 79e426270c
commit 662787b12b
17 changed files with 575 additions and 14 deletions
+6 -1
View File
@@ -12,7 +12,12 @@ package kotlin
// TODO: KT-35100
//@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
//public inline class Char internal constructor (val value: Int) : Comparable<Char> {
public class Char internal constructor(private val value: Int) : Comparable<Char> {
public class Char
@OptIn(ExperimentalUnsignedTypes::class)
@ExperimentalStdlibApi
@SinceKotlin("1.4")
constructor(code: UShort) : Comparable<Char> {
private val value: Int = code.toInt()
/**
* Compares this value with the specified value for order.