String.toBoolean() should be String?.toBoolean() #KT-14119
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
package kotlin.text
|
||||
|
||||
import kotlin.internal.LowPriorityInOverloadResolution
|
||||
|
||||
expect class Regex {
|
||||
constructor(pattern: String)
|
||||
constructor(pattern: String, option: RegexOption)
|
||||
@@ -282,9 +284,17 @@ public expect val String.Companion.CASE_INSENSITIVE_ORDER: Comparator<String>
|
||||
|
||||
|
||||
/**
|
||||
* Returns `true` if the contents of this string is equal to the word "true", ignoring case, and `false` otherwise.
|
||||
* Returns `true` if the content of this string is equal to the word "true", ignoring case, and `false` otherwise.
|
||||
*/
|
||||
expect fun String.toBoolean(): Boolean
|
||||
@LowPriorityInOverloadResolution
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun String.toBoolean(): Boolean = this.toBoolean()
|
||||
|
||||
/**
|
||||
* Returns `true` if this string is not `null` and its content is equal to the word "true", ignoring case, and `false` otherwise.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public expect fun String?.toBoolean(): Boolean
|
||||
|
||||
/**
|
||||
* Parses the string as a signed [Byte] number and returns the result.
|
||||
|
||||
Reference in New Issue
Block a user