Stabilize Char-to-Int conversions KT-45874
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -10,9 +10,8 @@ package kotlin
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.charFromCode
|
* @sample samples.text.Chars.charFromCode
|
||||||
*/
|
*/
|
||||||
@OptIn(ExperimentalUnsignedTypes::class)
|
@SinceKotlin("1.5")
|
||||||
@ExperimentalStdlibApi
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
@SinceKotlin("1.4")
|
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public actual inline fun Char(code: UShort): Char {
|
public actual inline fun Char(code: UShort): Char {
|
||||||
return code.toInt().toChar()
|
return code.toInt().toChar()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public val kotlin.Char.code: kotlin.Int { get; }
|
public val kotlin.Char.code: kotlin.Int { get; }
|
||||||
|
|
||||||
@@ -10,13 +10,13 @@ public val kotlin.reflect.KProperty0<*>.isInitialized: kotlin.Boolean { get; }
|
|||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.SinceKotlin(version = "1.4")
|
||||||
public val kotlin.Throwable.suppressedExceptions: kotlin.collections.List<kotlin.Throwable> { get; }
|
public val kotlin.Throwable.suppressedExceptions: kotlin.collections.List<kotlin.Throwable> { get; }
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public inline fun Char(code: kotlin.Int): kotlin.Char
|
public inline fun Char(code: kotlin.Int): kotlin.Char
|
||||||
|
|
||||||
/*∆*/ @kotlin.ExperimentalStdlibApi
|
/*∆*/ @kotlin.SinceKotlin(version = "1.5")
|
||||||
/*∆*/ @kotlin.SinceKotlin(version = "1.4")
|
/*∆*/ @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
/*∆*/ public inline fun Char(code: kotlin.UShort): kotlin.Char
|
/*∆*/ public inline fun Char(code: kotlin.UShort): kotlin.Char
|
||||||
/*∆*/
|
/*∆*/
|
||||||
|
|||||||
@@ -192,28 +192,28 @@ public inline fun kotlin.text.StringBuilder.deleteAt(index: kotlin.Int): kotlin.
|
|||||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public inline fun kotlin.text.StringBuilder.deleteRange(startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.text.StringBuilder
|
public inline fun kotlin.text.StringBuilder.deleteRange(startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.text.StringBuilder
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Int.digitToChar(): kotlin.Char
|
public fun kotlin.Int.digitToChar(): kotlin.Char
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Int.digitToChar(radix: kotlin.Int): kotlin.Char
|
public fun kotlin.Int.digitToChar(radix: kotlin.Int): kotlin.Char
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Char.digitToInt(): kotlin.Int
|
public fun kotlin.Char.digitToInt(): kotlin.Int
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Char.digitToInt(radix: kotlin.Int): kotlin.Int
|
public fun kotlin.Char.digitToInt(radix: kotlin.Int): kotlin.Int
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Char.digitToIntOrNull(): kotlin.Int?
|
public fun kotlin.Char.digitToIntOrNull(): kotlin.Int?
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Char.digitToIntOrNull(radix: kotlin.Int): kotlin.Int?
|
public fun kotlin.Char.digitToIntOrNull(radix: kotlin.Int): kotlin.Int?
|
||||||
|
|
||||||
public fun kotlin.CharSequence.drop(n: kotlin.Int): kotlin.CharSequence
|
public fun kotlin.CharSequence.drop(n: kotlin.Int): kotlin.CharSequence
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public val kotlin.Char.code: kotlin.Int { get; }
|
public val kotlin.Char.code: kotlin.Int { get; }
|
||||||
|
|
||||||
@@ -10,8 +10,8 @@ public val kotlin.reflect.KProperty0<*>.isInitialized: kotlin.Boolean { get; }
|
|||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.SinceKotlin(version = "1.4")
|
||||||
public val kotlin.Throwable.suppressedExceptions: kotlin.collections.List<kotlin.Throwable> { get; }
|
public val kotlin.Throwable.suppressedExceptions: kotlin.collections.List<kotlin.Throwable> { get; }
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public inline fun Char(code: kotlin.Int): kotlin.Char
|
public inline fun Char(code: kotlin.Int): kotlin.Char
|
||||||
|
|
||||||
@@ -1033,8 +1033,8 @@ public final class ByteArray {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class Char : kotlin.Comparable<kotlin.Char> {
|
public final class Char : kotlin.Comparable<kotlin.Char> {
|
||||||
/*∆*/ @kotlin.ExperimentalStdlibApi
|
/*∆*/ @kotlin.SinceKotlin(version = "1.5")
|
||||||
/*∆*/ @kotlin.SinceKotlin(version = "1.4")
|
/*∆*/ @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
/*∆*/ public constructor Char(code: kotlin.UShort)
|
/*∆*/ public constructor Char(code: kotlin.UShort)
|
||||||
/*∆*/
|
/*∆*/
|
||||||
public open override operator fun compareTo(other: kotlin.Char): kotlin.Int
|
public open override operator fun compareTo(other: kotlin.Char): kotlin.Int
|
||||||
|
|||||||
@@ -192,28 +192,28 @@ public inline fun kotlin.text.StringBuilder.deleteAt(index: kotlin.Int): kotlin.
|
|||||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public inline fun kotlin.text.StringBuilder.deleteRange(startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.text.StringBuilder
|
public inline fun kotlin.text.StringBuilder.deleteRange(startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.text.StringBuilder
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Int.digitToChar(): kotlin.Char
|
public fun kotlin.Int.digitToChar(): kotlin.Char
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Int.digitToChar(radix: kotlin.Int): kotlin.Char
|
public fun kotlin.Int.digitToChar(radix: kotlin.Int): kotlin.Char
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Char.digitToInt(): kotlin.Int
|
public fun kotlin.Char.digitToInt(): kotlin.Int
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Char.digitToInt(radix: kotlin.Int): kotlin.Int
|
public fun kotlin.Char.digitToInt(radix: kotlin.Int): kotlin.Int
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Char.digitToIntOrNull(): kotlin.Int?
|
public fun kotlin.Char.digitToIntOrNull(): kotlin.Int?
|
||||||
|
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.SinceKotlin(version = "1.5")
|
||||||
@kotlin.SinceKotlin(version = "1.4")
|
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||||
public fun kotlin.Char.digitToIntOrNull(radix: kotlin.Int): kotlin.Int?
|
public fun kotlin.Char.digitToIntOrNull(radix: kotlin.Int): kotlin.Int?
|
||||||
|
|
||||||
public fun kotlin.CharSequence.drop(n: kotlin.Int): kotlin.CharSequence
|
public fun kotlin.CharSequence.drop(n: kotlin.Int): kotlin.CharSequence
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -12,9 +12,8 @@ package kotlin
|
|||||||
// TODO: KT-35100
|
// TODO: KT-35100
|
||||||
//public inline class Char internal constructor (val value: Int) : Comparable<Char> {
|
//public inline class Char internal constructor (val value: Int) : Comparable<Char> {
|
||||||
public class Char
|
public class Char
|
||||||
@OptIn(ExperimentalUnsignedTypes::class)
|
@SinceKotlin("1.5")
|
||||||
@ExperimentalStdlibApi
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
@SinceKotlin("1.4")
|
|
||||||
constructor(code: UShort) : Comparable<Char> {
|
constructor(code: UShort) : Comparable<Char> {
|
||||||
private val value: Int = code.toInt()
|
private val value: Int = code.toInt()
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ package kotlin
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.charFromCode
|
* @sample samples.text.Chars.charFromCode
|
||||||
*/
|
*/
|
||||||
@ExperimentalStdlibApi
|
@SinceKotlin("1.5")
|
||||||
@SinceKotlin("1.4")
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public actual inline fun Char(code: UShort): Char {
|
public actual inline fun Char(code: UShort): Char {
|
||||||
return code.toInt().toChar()
|
return code.toInt().toChar()
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ package kotlin
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.charFromCode
|
* @sample samples.text.Chars.charFromCode
|
||||||
*/
|
*/
|
||||||
@ExperimentalStdlibApi
|
@SinceKotlin("1.5")
|
||||||
@SinceKotlin("1.4")
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public actual inline fun Char(code: UShort): Char {
|
public actual inline fun Char(code: UShort): Char {
|
||||||
return code.toInt().toChar()
|
return code.toInt().toChar()
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ package kotlin
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.charFromCode
|
* @sample samples.text.Chars.charFromCode
|
||||||
*/
|
*/
|
||||||
@ExperimentalStdlibApi
|
@SinceKotlin("1.5")
|
||||||
@SinceKotlin("1.4")
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public inline fun Char(code: Int): Char {
|
public inline fun Char(code: Int): Char {
|
||||||
if (code < Char.MIN_VALUE.code || code > Char.MAX_VALUE.code) {
|
if (code < Char.MIN_VALUE.code || code > Char.MAX_VALUE.code) {
|
||||||
@@ -30,8 +30,8 @@ public inline fun Char(code: Int): Char {
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.charFromCode
|
* @sample samples.text.Chars.charFromCode
|
||||||
*/
|
*/
|
||||||
@ExperimentalStdlibApi
|
@SinceKotlin("1.5")
|
||||||
@SinceKotlin("1.4")
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
@Suppress("NO_ACTUAL_FOR_EXPECT")
|
@Suppress("NO_ACTUAL_FOR_EXPECT")
|
||||||
public expect fun Char(code: UShort): Char
|
public expect fun Char(code: UShort): Char
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ public expect fun Char(code: UShort): Char
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.code
|
* @sample samples.text.Chars.code
|
||||||
*/
|
*/
|
||||||
@ExperimentalStdlibApi
|
@SinceKotlin("1.5")
|
||||||
@SinceKotlin("1.4")
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public inline val Char.code: Int get() = this.toInt()
|
public inline val Char.code: Int get() = this.toInt()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -17,9 +17,10 @@ package kotlin.text
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.digitToInt
|
* @sample samples.text.Chars.digitToInt
|
||||||
*/
|
*/
|
||||||
@ExperimentalStdlibApi
|
@SinceKotlin("1.5")
|
||||||
@SinceKotlin("1.4")
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
public fun Char.digitToInt(): Int {
|
public fun Char.digitToInt(): Int {
|
||||||
|
// TODO: needs to support all digits in JVM
|
||||||
if (this in '0'..'9') {
|
if (this in '0'..'9') {
|
||||||
return this - '0'
|
return this - '0'
|
||||||
}
|
}
|
||||||
@@ -37,8 +38,8 @@ public fun Char.digitToInt(): Int {
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.digitToInt
|
* @sample samples.text.Chars.digitToInt
|
||||||
*/
|
*/
|
||||||
@ExperimentalStdlibApi
|
@SinceKotlin("1.5")
|
||||||
@SinceKotlin("1.4")
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
public fun Char.digitToInt(radix: Int): Int {
|
public fun Char.digitToInt(radix: Int): Int {
|
||||||
return digitToIntOrNull(radix) ?: throw IllegalArgumentException("Char $this is not a digit in the given radix=$radix")
|
return digitToIntOrNull(radix) ?: throw IllegalArgumentException("Char $this is not a digit in the given radix=$radix")
|
||||||
}
|
}
|
||||||
@@ -52,9 +53,10 @@ public fun Char.digitToInt(radix: Int): Int {
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.digitToIntOrNull
|
* @sample samples.text.Chars.digitToIntOrNull
|
||||||
*/
|
*/
|
||||||
@ExperimentalStdlibApi
|
@SinceKotlin("1.5")
|
||||||
@SinceKotlin("1.4")
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
public fun Char.digitToIntOrNull(): Int? {
|
public fun Char.digitToIntOrNull(): Int? {
|
||||||
|
// TODO: needs to support all digits in JVM
|
||||||
if (this in '0'..'9') {
|
if (this in '0'..'9') {
|
||||||
return this - '0'
|
return this - '0'
|
||||||
}
|
}
|
||||||
@@ -72,9 +74,10 @@ public fun Char.digitToIntOrNull(): Int? {
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.digitToIntOrNull
|
* @sample samples.text.Chars.digitToIntOrNull
|
||||||
*/
|
*/
|
||||||
@ExperimentalStdlibApi
|
@SinceKotlin("1.5")
|
||||||
@SinceKotlin("1.4")
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
public fun Char.digitToIntOrNull(radix: Int): Int? {
|
public fun Char.digitToIntOrNull(radix: Int): Int? {
|
||||||
|
// TODO: needs to support all digits in JVM
|
||||||
if (radix !in 2..36) {
|
if (radix !in 2..36) {
|
||||||
throw IllegalArgumentException("Invalid radix: $radix. Valid radix values are in range 2..36")
|
throw IllegalArgumentException("Invalid radix: $radix. Valid radix values are in range 2..36")
|
||||||
}
|
}
|
||||||
@@ -95,8 +98,8 @@ public fun Char.digitToIntOrNull(radix: Int): Int? {
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.digitToChar
|
* @sample samples.text.Chars.digitToChar
|
||||||
*/
|
*/
|
||||||
@ExperimentalStdlibApi
|
@SinceKotlin("1.5")
|
||||||
@SinceKotlin("1.4")
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
public fun Int.digitToChar(): Char {
|
public fun Int.digitToChar(): Char {
|
||||||
if (this in 0..9) {
|
if (this in 0..9) {
|
||||||
return '0' + this
|
return '0' + this
|
||||||
@@ -113,8 +116,8 @@ public fun Int.digitToChar(): Char {
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.digitToChar
|
* @sample samples.text.Chars.digitToChar
|
||||||
*/
|
*/
|
||||||
@ExperimentalStdlibApi
|
@SinceKotlin("1.5")
|
||||||
@SinceKotlin("1.4")
|
@WasExperimental(ExperimentalStdlibApi::class)
|
||||||
public fun Int.digitToChar(radix: Int): Char {
|
public fun Int.digitToChar(radix: Int): Char {
|
||||||
if (radix !in 2..36) {
|
if (radix !in 2..36) {
|
||||||
throw IllegalArgumentException("Invalid radix: $radix. Valid radix values are in range 2..36")
|
throw IllegalArgumentException("Invalid radix: $radix. Valid radix values are in range 2..36")
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -10,7 +10,5 @@ package kotlin
|
|||||||
*
|
*
|
||||||
* @sample samples.text.Chars.charFromCode
|
* @sample samples.text.Chars.charFromCode
|
||||||
*/
|
*/
|
||||||
@OptIn(ExperimentalUnsignedTypes::class)
|
@SinceKotlin("1.5")
|
||||||
@ExperimentalStdlibApi
|
|
||||||
@SinceKotlin("1.4")
|
|
||||||
public actual fun Char(code: UShort): Char = TODO("Wasm stdlib: CharCode")
|
public actual fun Char(code: UShort): Char = TODO("Wasm stdlib: CharCode")
|
||||||
|
|||||||
Reference in New Issue
Block a user