Revert "Promote String <-> utf8 and CharArray conversions to stable"
This reverts commit aba97033
This commit is contained in:
@@ -92,8 +92,8 @@ public expect fun String(chars: CharArray, offset: Int, length: Int): String
|
||||
/**
|
||||
* Concatenates characters in this [CharArray] into a String.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
public expect fun CharArray.concatToString(): String
|
||||
|
||||
/**
|
||||
@@ -105,15 +105,15 @@ public expect fun CharArray.concatToString(): String
|
||||
* @throws IndexOutOfBoundsException if [startIndex] is less than zero or [endIndex] is greater than the size of this array.
|
||||
* @throws IllegalArgumentException if [startIndex] is greater than [endIndex].
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
public expect fun CharArray.concatToString(startIndex: Int = 0, endIndex: Int = this.size): String
|
||||
|
||||
/**
|
||||
* Returns a [CharArray] containing characters of this string.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
public expect fun String.toCharArray(): CharArray
|
||||
|
||||
/**
|
||||
@@ -125,8 +125,8 @@ public expect fun String.toCharArray(): CharArray
|
||||
* @throws IndexOutOfBoundsException if [startIndex] is less than zero or [endIndex] is greater than the length of this string.
|
||||
* @throws IllegalArgumentException if [startIndex] is greater than [endIndex].
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
public expect fun String.toCharArray(startIndex: Int = 0, endIndex: Int = this.length): CharArray
|
||||
|
||||
/**
|
||||
@@ -134,8 +134,8 @@ public expect fun String.toCharArray(startIndex: Int = 0, endIndex: Int = this.l
|
||||
*
|
||||
* Malformed byte sequences are replaced by the replacement char `\uFFFD`.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
public expect fun ByteArray.decodeToString(): String
|
||||
|
||||
/**
|
||||
@@ -149,8 +149,8 @@ public expect fun ByteArray.decodeToString(): String
|
||||
* @throws IllegalArgumentException if [startIndex] is greater than [endIndex].
|
||||
* @throws CharacterCodingException if the byte array contains malformed UTF-8 byte sequence and [throwOnInvalidSequence] is true.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
public expect fun ByteArray.decodeToString(
|
||||
startIndex: Int = 0,
|
||||
endIndex: Int = this.size,
|
||||
@@ -162,8 +162,8 @@ public expect fun ByteArray.decodeToString(
|
||||
*
|
||||
* Any malformed char sequence is replaced by the replacement byte sequence.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
public expect fun String.encodeToByteArray(): ByteArray
|
||||
|
||||
/**
|
||||
@@ -177,8 +177,8 @@ public expect fun String.encodeToByteArray(): ByteArray
|
||||
* @throws IllegalArgumentException if [startIndex] is greater than [endIndex].
|
||||
* @throws CharacterCodingException if this string contains malformed char sequence and [throwOnInvalidSequence] is true.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
public expect fun String.encodeToByteArray(
|
||||
startIndex: Int = 0,
|
||||
endIndex: Int = this.length,
|
||||
|
||||
Reference in New Issue
Block a user