diff --git a/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt b/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt index 91f483aab70..b11c98be1ab 100644 --- a/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt +++ b/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt @@ -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.