Clean up WasExperimental annotation from declarations with SinceKotlin<=1.4
Since it is not possible to use -api-version < 1.4, this annotation has no effect
This commit is contained in:
committed by
Space Team
parent
081e1de5af
commit
9ccce52915
@@ -16,5 +16,4 @@ package kotlin.text
|
||||
* The exception thrown when a character encoding or decoding error occurs.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public actual typealias CharacterCodingException = java.nio.charset.CharacterCodingException
|
||||
@@ -34,7 +34,6 @@ public actual inline operator fun StringBuilder.set(index: Int, value: Char): Un
|
||||
* @throws IndexOutOfBoundsException or [IllegalArgumentException] if [startIndex] is less than zero, greater than the length of this string builder, or `startIndex > endIndex`.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun StringBuilder.setRange(startIndex: Int, endIndex: Int, value: String): StringBuilder =
|
||||
this.replace(startIndex, endIndex, value)
|
||||
@@ -49,7 +48,6 @@ public actual inline fun StringBuilder.setRange(startIndex: Int, endIndex: Int,
|
||||
* @throws IndexOutOfBoundsException if [index] is out of bounds of this string builder.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun StringBuilder.deleteAt(index: Int): StringBuilder = this.deleteCharAt(index)
|
||||
|
||||
@@ -62,7 +60,6 @@ public actual inline fun StringBuilder.deleteAt(index: Int): StringBuilder = thi
|
||||
* @throws IndexOutOfBoundsException or [IllegalArgumentException] when [startIndex] is out of range of this string builder indices or when `startIndex > endIndex`.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun StringBuilder.deleteRange(startIndex: Int, endIndex: Int): StringBuilder = this.delete(startIndex, endIndex)
|
||||
|
||||
@@ -79,7 +76,6 @@ public actual inline fun StringBuilder.deleteRange(startIndex: Int, endIndex: In
|
||||
* or when that index is out of the [destination] array indices range.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual inline fun StringBuilder.toCharArray(destination: CharArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = this.length) =
|
||||
@@ -97,7 +93,6 @@ public actual inline fun StringBuilder.toCharArray(destination: CharArray, desti
|
||||
* @throws IndexOutOfBoundsException or [IllegalArgumentException] when [startIndex] or [endIndex] is out of range of the [value] array indices or when `startIndex > endIndex`.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun StringBuilder.appendRange(value: CharArray, startIndex: Int, endIndex: Int): StringBuilder =
|
||||
this.append(value, startIndex, endIndex - startIndex)
|
||||
@@ -112,7 +107,6 @@ public actual inline fun StringBuilder.appendRange(value: CharArray, startIndex:
|
||||
* @throws IndexOutOfBoundsException or [IllegalArgumentException] when [startIndex] or [endIndex] is out of range of the [value] character sequence indices or when `startIndex > endIndex`.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun StringBuilder.appendRange(value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder =
|
||||
this.append(value, startIndex, endIndex)
|
||||
@@ -131,7 +125,6 @@ public actual inline fun StringBuilder.appendRange(value: CharSequence, startInd
|
||||
* @throws IndexOutOfBoundsException if [index] is less than zero or greater than the length of this string builder.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun StringBuilder.insertRange(index: Int, value: CharArray, startIndex: Int, endIndex: Int): StringBuilder =
|
||||
this.insert(index, value, startIndex, endIndex - startIndex)
|
||||
@@ -150,7 +143,6 @@ public actual inline fun StringBuilder.insertRange(index: Int, value: CharArray,
|
||||
* @throws IndexOutOfBoundsException if [index] is less than zero or greater than the length of this string builder.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun StringBuilder.insertRange(index: Int, value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder =
|
||||
this.insert(index, value, startIndex, endIndex)
|
||||
|
||||
@@ -171,7 +171,6 @@ public actual inline fun String.lowercase(): String = (this as java.lang.String)
|
||||
* Concatenates characters in this [CharArray] into a String.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public actual fun CharArray.concatToString(): String {
|
||||
return String(this)
|
||||
}
|
||||
@@ -186,7 +185,6 @@ public actual fun CharArray.concatToString(): String {
|
||||
* @throws IllegalArgumentException if [startIndex] is greater than [endIndex].
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun CharArray.concatToString(startIndex: Int = 0, endIndex: Int = this.size): String {
|
||||
AbstractList.checkBoundsIndexes(startIndex, endIndex, this.size)
|
||||
@@ -203,7 +201,6 @@ public actual fun CharArray.concatToString(startIndex: Int = 0, endIndex: Int =
|
||||
* @throws IllegalArgumentException if [startIndex] is greater than [endIndex].
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun String.toCharArray(startIndex: Int = 0, endIndex: Int = this.length): CharArray {
|
||||
AbstractList.checkBoundsIndexes(startIndex, endIndex, length)
|
||||
@@ -216,7 +213,6 @@ public actual 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)
|
||||
public actual fun ByteArray.decodeToString(): String {
|
||||
return String(this)
|
||||
}
|
||||
@@ -233,7 +229,6 @@ public actual fun ByteArray.decodeToString(): String {
|
||||
* @throws CharacterCodingException if the byte array contains malformed UTF-8 byte sequence and [throwOnInvalidSequence] is true.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun ByteArray.decodeToString(
|
||||
startIndex: Int = 0,
|
||||
@@ -259,7 +254,6 @@ public actual fun ByteArray.decodeToString(
|
||||
* Any malformed char sequence is replaced by the replacement byte sequence.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public actual fun String.encodeToByteArray(): ByteArray {
|
||||
return this.toByteArray(Charsets.UTF_8)
|
||||
}
|
||||
@@ -276,7 +270,6 @@ public actual fun String.encodeToByteArray(): ByteArray {
|
||||
* @throws CharacterCodingException if this string contains malformed char sequence and [throwOnInvalidSequence] is true.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun String.encodeToByteArray(
|
||||
startIndex: Int = 0,
|
||||
@@ -725,7 +718,6 @@ public actual fun String.capitalize(): String {
|
||||
@Deprecated("Use replaceFirstChar instead.", ReplaceWith("replaceFirstChar { if (it.isLowerCase()) it.titlecase(locale) else it.toString() }"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.LowPriorityInOverloadResolution // To avoid conflicts in function references, as this function was introduced later than common capitalize()
|
||||
public fun String.capitalize(locale: Locale): String {
|
||||
if (isNotEmpty()) {
|
||||
@@ -765,7 +757,6 @@ public actual fun String.decapitalize(): String {
|
||||
@Deprecated("Use replaceFirstChar instead.", ReplaceWith("replaceFirstChar { it.lowercase(locale) }"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.LowPriorityInOverloadResolution // To avoid conflicts in function references, as this function was introduced later than common decapitalize()
|
||||
public fun String.decapitalize(locale: Locale): String {
|
||||
return if (isNotEmpty() && !this[0].isLowerCase()) substring(0, 1).lowercase(locale) + substring(1) else this
|
||||
|
||||
@@ -98,7 +98,6 @@ public actual inline fun Float.Companion.fromBits(bits: Int): Float = java.lang.
|
||||
* Counts the number of set bits in the binary representation of this [Int] number.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun Int.countOneBits(): Int = Integer.bitCount(this)
|
||||
|
||||
@@ -106,7 +105,6 @@ public actual inline fun Int.countOneBits(): Int = Integer.bitCount(this)
|
||||
* Counts the number of consecutive most significant bits that are zero in the binary representation of this [Int] number.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun Int.countLeadingZeroBits(): Int = Integer.numberOfLeadingZeros(this)
|
||||
|
||||
@@ -114,7 +112,6 @@ public actual inline fun Int.countLeadingZeroBits(): Int = Integer.numberOfLeadi
|
||||
* Counts the number of consecutive least significant bits that are zero in the binary representation of this [Int] number.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun Int.countTrailingZeroBits(): Int = Integer.numberOfTrailingZeros(this)
|
||||
|
||||
@@ -123,7 +120,6 @@ public actual inline fun Int.countTrailingZeroBits(): Int = Integer.numberOfTrai
|
||||
* or zero, if this number is zero.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun Int.takeHighestOneBit(): Int = Integer.highestOneBit(this)
|
||||
|
||||
@@ -132,7 +128,6 @@ public actual inline fun Int.takeHighestOneBit(): Int = Integer.highestOneBit(th
|
||||
* or zero, if this number is zero.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun Int.takeLowestOneBit(): Int = Integer.lowestOneBit(this)
|
||||
|
||||
@@ -172,7 +167,6 @@ public actual inline fun Int.rotateRight(bitCount: Int): Int = Integer.rotateRig
|
||||
* Counts the number of set bits in the binary representation of this [Long] number.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun Long.countOneBits(): Int = java.lang.Long.bitCount(this)
|
||||
|
||||
@@ -180,7 +174,6 @@ public actual inline fun Long.countOneBits(): Int = java.lang.Long.bitCount(this
|
||||
* Counts the number of consecutive most significant bits that are zero in the binary representation of this [Long] number.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun Long.countLeadingZeroBits(): Int = java.lang.Long.numberOfLeadingZeros(this)
|
||||
|
||||
@@ -188,7 +181,6 @@ public actual inline fun Long.countLeadingZeroBits(): Int = java.lang.Long.numbe
|
||||
* Counts the number of consecutive least significant bits that are zero in the binary representation of this [Long] number.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun Long.countTrailingZeroBits(): Int = java.lang.Long.numberOfTrailingZeros(this)
|
||||
|
||||
@@ -197,7 +189,6 @@ public actual inline fun Long.countTrailingZeroBits(): Int = java.lang.Long.numb
|
||||
* or zero, if this number is zero.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun Long.takeHighestOneBit(): Long = java.lang.Long.highestOneBit(this)
|
||||
|
||||
@@ -206,7 +197,6 @@ public actual inline fun Long.takeHighestOneBit(): Long = java.lang.Long.highest
|
||||
* or zero, if this number is zero.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun Long.takeLowestOneBit(): Long = java.lang.Long.lowestOneBit(this)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user