String.toBoolean() should be String?.toBoolean() #KT-14119 (#3946)
`String.toBoolean()` should be `String?.toBoolean()` #KT-14119 (cherry picked from commit 3edf880ca0944bc7dc7aaeeae59083f49a6fe0ee)
This commit is contained in:
committed by
Vasily Levchenko
parent
ff213cb104
commit
dbda4174c7
@@ -52,10 +52,11 @@ external internal fun longToString(value: Long, radix: Int): String
|
||||
public actual inline fun Long.toString(radix: Int): String = longToString(this, checkRadix(radix))
|
||||
|
||||
/**
|
||||
* Returns `true` if the contents of this string is equal to the word "true", ignoring case, and `false` otherwise.
|
||||
* 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")
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun String.toBoolean(): Boolean = this.equals("true", ignoreCase = true)
|
||||
public actual inline fun String?.toBoolean(): Boolean = this.equals("true", ignoreCase = true)
|
||||
|
||||
/**
|
||||
* Parses the string as a signed [Byte] number and returns the result.
|
||||
|
||||
Reference in New Issue
Block a user