diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt index ca3a22390195f..7bf16cea15304 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt @@ -67,7 +67,7 @@ public actual inline fun String?.toBoolean(): Boolean = this.equals("true", igno /** * Parses the string to a [Byte] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Byte] value range (within `Byte.MIN_VALUE..Byte.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -89,7 +89,7 @@ public actual inline fun String.toByte(radix: Int): Byte = toByteOrNull(radix) ? /** * Parses the string to a [Short] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Short] value range (within `Short.MIN_VALUE..Short.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -111,7 +111,7 @@ public actual inline fun String.toShort(radix: Int): Short = toShortOrNull(radix /** * Parses the string to an [Int] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Int] value range (within `Int.MIN_VALUE..Int.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -133,7 +133,7 @@ public actual inline fun String.toInt(radix: Int): Int = toIntOrNull(radix) ?: t /** * Parses the string to a [Long] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Long] value range (within `Long.MIN_VALUE..Long.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * diff --git a/libraries/stdlib/common/src/kotlin/TextH.kt b/libraries/stdlib/common/src/kotlin/TextH.kt index 1c484256bae64..da5c17d77e190 100644 --- a/libraries/stdlib/common/src/kotlin/TextH.kt +++ b/libraries/stdlib/common/src/kotlin/TextH.kt @@ -551,7 +551,7 @@ public expect fun String?.toBoolean(): Boolean /** * Parses the string to a [Byte] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Byte] value range (within `Byte.MIN_VALUE..Byte.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -570,7 +570,7 @@ public expect fun String.toByte(radix: Int): Byte /** * Parses the string to a [Short] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Short] value range (within `Short.MIN_VALUE..Short.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -589,7 +589,7 @@ public expect fun String.toShort(radix: Int): Short /** * Parses the string to an [Int] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Int] value range (within `Int.MIN_VALUE..Int.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -608,7 +608,7 @@ public expect fun String.toInt(radix: Int): Int /** * Parses the string to a [Long] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Long] value range (within `Long.MIN_VALUE..Long.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * diff --git a/libraries/stdlib/js/src/kotlin/text/numberConversions.kt b/libraries/stdlib/js/src/kotlin/text/numberConversions.kt index 6614172acb67d..af9111e956433 100644 --- a/libraries/stdlib/js/src/kotlin/text/numberConversions.kt +++ b/libraries/stdlib/js/src/kotlin/text/numberConversions.kt @@ -20,7 +20,7 @@ public actual fun String?.toBoolean(): Boolean = this != null && this.lowercase( /** * Parses the string to a [Byte] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Byte] value range (within `Byte.MIN_VALUE..Byte.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -40,7 +40,7 @@ public actual fun String.toByte(radix: Int): Byte = toByteOrNull(radix) ?: numbe /** * Parses the string to a [Short] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Short] value range (within `Short.MIN_VALUE..Short.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -59,7 +59,7 @@ public actual fun String.toShort(radix: Int): Short = toShortOrNull(radix) ?: nu /** * Parses the string to an [Int] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Int] value range (within `Int.MIN_VALUE..Int.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -78,7 +78,7 @@ public actual fun String.toInt(radix: Int): Int = toIntOrNull(radix) ?: numberFo /** * Parses the string to a [Long] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Long] value range (within `Long.MIN_VALUE..Long.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * diff --git a/libraries/stdlib/jvm/src/kotlin/text/StringNumberConversionsJVM.kt b/libraries/stdlib/jvm/src/kotlin/text/StringNumberConversionsJVM.kt index ef798245e495f..6576338e9b3eb 100644 --- a/libraries/stdlib/jvm/src/kotlin/text/StringNumberConversionsJVM.kt +++ b/libraries/stdlib/jvm/src/kotlin/text/StringNumberConversionsJVM.kt @@ -57,7 +57,7 @@ public actual inline fun String?.toBoolean(): Boolean = java.lang.Boolean.parseB /** * Parses the string to a [Byte] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Byte] value range (within `Byte.MIN_VALUE..Byte.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -80,7 +80,7 @@ public actual inline fun String.toByte(radix: Int): Byte = java.lang.Byte.parseB /** * Parses the string to a [Short] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Short] value range (within `Short.MIN_VALUE..Short.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -102,7 +102,7 @@ public actual inline fun String.toShort(radix: Int): Short = java.lang.Short.par /** * Parses the string to an [Int] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Int] value range (within `Int.MIN_VALUE..Int.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -124,7 +124,7 @@ public actual inline fun String.toInt(radix: Int): Int = java.lang.Integer.parse /** * Parses the string to a [Long] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Long] value range (within `Long.MIN_VALUE..Long.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * diff --git a/libraries/stdlib/src/kotlin/text/StringNumberConversions.kt b/libraries/stdlib/src/kotlin/text/StringNumberConversions.kt index 34a749a34fcf5..79eb944fe6b44 100644 --- a/libraries/stdlib/src/kotlin/text/StringNumberConversions.kt +++ b/libraries/stdlib/src/kotlin/text/StringNumberConversions.kt @@ -12,7 +12,7 @@ package kotlin.text /** * Parses the string to a [Byte] number or returns `null` if the string is not a valid representation of a [Byte]. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Byte] value range (within `Byte.MIN_VALUE..Byte.MAX_VALUE`), * otherwise `null` is returned. * @@ -37,7 +37,7 @@ public fun String.toByteOrNull(radix: Int): Byte? { /** * Parses the string to a [Short] number or returns `null` if the string is not a valid representation of a [Short]. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Short] value range (within `Short.MIN_VALUE..Short.MAX_VALUE`), * otherwise `null` is returned. * @@ -62,7 +62,7 @@ public fun String.toShortOrNull(radix: Int): Short? { /** * Parses the string to an [Int] number or returns `null` if the string is not a valid representation of an [Int]. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Int] value range (within `Int.MIN_VALUE..Int.MAX_VALUE`), * otherwise `null` is returned. * @@ -142,7 +142,7 @@ public fun String.toIntOrNull(radix: Int): Int? { /** * Parses the string to a [Long] number or returns `null` if the string is not a valid representation of a [Long]. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Long] value range (within `Long.MIN_VALUE..Long.MAX_VALUE`), * otherwise `null` is returned. * diff --git a/libraries/stdlib/wasm/src/kotlin/text/StringNumberConversionsWasm.kt b/libraries/stdlib/wasm/src/kotlin/text/StringNumberConversionsWasm.kt index 2e26ab12a1567..76cb305e8be56 100644 --- a/libraries/stdlib/wasm/src/kotlin/text/StringNumberConversionsWasm.kt +++ b/libraries/stdlib/wasm/src/kotlin/text/StringNumberConversionsWasm.kt @@ -17,7 +17,7 @@ public actual fun String?.toBoolean(): Boolean = this != null && this.lowercase( /** * Parses the string to a [Byte] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Byte] value range (within `Byte.MIN_VALUE..Byte.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -36,7 +36,7 @@ public actual fun String.toByte(radix: Int): Byte = toByteOrNull(radix) ?: numbe /** * Parses the string to a [Short] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Short] value range (within `Short.MIN_VALUE..Short.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -55,7 +55,7 @@ public actual fun String.toShort(radix: Int): Short = toShortOrNull(radix) ?: nu /** * Parses the string to an [Int] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Int] value range (within `Int.MIN_VALUE..Int.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. * @@ -74,7 +74,7 @@ public actual fun String.toInt(radix: Int): Int = toIntOrNull(radix) ?: numberFo /** * Parses the string to a [Long] number. * - * The string must consist of an optional leading `+` or `-` sign and decimal digits (`0-9`), + * The string must consist of an optional leading `+` or `-` sign and decimal digits (like `0-9`), * and fit the valid [Long] value range (within `Long.MIN_VALUE..Long.MAX_VALUE`), * otherwise a [NumberFormatException] will be thrown. *