Stabilize new string and char case conversion API KT-45873
This commit is contained in:
@@ -131,8 +131,8 @@ public expect fun Char.toLowerCase(): Char
|
||||
*
|
||||
* @sample samples.text.Chars.lowercase
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public expect fun Char.lowercaseChar(): Char
|
||||
|
||||
/**
|
||||
@@ -145,8 +145,8 @@ public expect fun Char.lowercaseChar(): Char
|
||||
*
|
||||
* @sample samples.text.Chars.lowercase
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public expect fun Char.lowercase(): String
|
||||
|
||||
/**
|
||||
@@ -163,8 +163,8 @@ public expect fun Char.toUpperCase(): Char
|
||||
*
|
||||
* @sample samples.text.Chars.uppercase
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public expect fun Char.uppercaseChar(): Char
|
||||
|
||||
/**
|
||||
@@ -177,8 +177,8 @@ public expect fun Char.uppercaseChar(): Char
|
||||
*
|
||||
* @sample samples.text.Chars.uppercase
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public expect fun Char.uppercase(): String
|
||||
|
||||
/**
|
||||
@@ -191,7 +191,6 @@ public expect fun Char.uppercase(): String
|
||||
* @sample samples.text.Chars.titlecase
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@ExperimentalStdlibApi
|
||||
public expect fun Char.titlecaseChar(): Char
|
||||
|
||||
/**
|
||||
@@ -205,7 +204,6 @@ public expect fun Char.titlecaseChar(): Char
|
||||
* @sample samples.text.Chars.titlecase
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@ExperimentalStdlibApi
|
||||
public fun Char.titlecase(): String = titlecaseImpl()
|
||||
|
||||
/**
|
||||
@@ -228,7 +226,6 @@ public inline operator fun Char.plus(other: String): String = this.toString() +
|
||||
*
|
||||
* @sample samples.text.Chars.equals
|
||||
*/
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
public fun Char.equals(other: Char, ignoreCase: Boolean = false): Boolean {
|
||||
if (this == other) return true
|
||||
if (!ignoreCase) return false
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -24,8 +24,8 @@ public expect fun String.toUpperCase(): String
|
||||
*
|
||||
* @sample samples.text.Strings.uppercase
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public expect fun String.uppercase(): String
|
||||
|
||||
/**
|
||||
@@ -41,8 +41,8 @@ public expect fun String.toLowerCase(): String
|
||||
*
|
||||
* @sample samples.text.Strings.lowercase
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public expect fun String.lowercase(): String
|
||||
|
||||
/**
|
||||
@@ -772,8 +772,8 @@ public inline fun CharSequence.replaceFirst(regex: Regex, replacement: String):
|
||||
*
|
||||
* @sample samples.text.Strings.replaceFirstChar
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@OptIn(kotlin.experimental.ExperimentalTypeInference::class)
|
||||
@OverloadResolutionByLambdaReturnType
|
||||
@JvmName("replaceFirstCharWithChar")
|
||||
@@ -790,8 +790,8 @@ public inline fun String.replaceFirstChar(transform: (Char) -> Char): String {
|
||||
*
|
||||
* @sample samples.text.Strings.replaceFirstChar
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@OptIn(kotlin.experimental.ExperimentalTypeInference::class)
|
||||
@OverloadResolutionByLambdaReturnType
|
||||
@JvmName("replaceFirstCharWithCharSequence")
|
||||
|
||||
Reference in New Issue
Block a user