From ebe9d59df707b8de3f6f0cbd534a999263d21917 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Thu, 18 Oct 2018 22:24:39 +0300 Subject: [PATCH] Unify print/println/readLine docs --- libraries/stdlib/common/src/kotlin/ioH.kt | 6 +-- libraries/stdlib/js/src/kotlin/console.kt | 6 +-- libraries/stdlib/jvm/src/kotlin/io/Console.kt | 42 +++++++++---------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/libraries/stdlib/common/src/kotlin/ioH.kt b/libraries/stdlib/common/src/kotlin/ioH.kt index 41936b0bde0..211ff9ef8db 100644 --- a/libraries/stdlib/common/src/kotlin/ioH.kt +++ b/libraries/stdlib/common/src/kotlin/ioH.kt @@ -6,13 +6,13 @@ package kotlin.io -/** Prints a newline to the standard output stream. */ +/** Prints the line separator to the standard output stream. */ public expect fun println() -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ public expect fun println(message: Any?) -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ public expect fun print(message: Any?) diff --git a/libraries/stdlib/js/src/kotlin/console.kt b/libraries/stdlib/js/src/kotlin/console.kt index f9ea7b7ff03..ec5d4ecc145 100644 --- a/libraries/stdlib/js/src/kotlin/console.kt +++ b/libraries/stdlib/js/src/kotlin/console.kt @@ -86,17 +86,17 @@ internal var output = run { @kotlin.internal.InlineOnly private inline fun String(value: Any?): String = js("String")(value) -/** Prints a newline to the standard output stream. */ +/** Prints the line separator to the standard output stream. */ public actual fun println() { output.println() } -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ public actual fun println(message: Any?) { output.println(message) } -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ public actual fun print(message: Any?) { output.print(message) } diff --git a/libraries/stdlib/jvm/src/kotlin/io/Console.kt b/libraries/stdlib/jvm/src/kotlin/io/Console.kt index 49631b1c60e..925dbd12541 100644 --- a/libraries/stdlib/jvm/src/kotlin/io/Console.kt +++ b/libraries/stdlib/jvm/src/kotlin/io/Console.kt @@ -14,127 +14,127 @@ import java.nio.CharBuffer import java.nio.charset.Charset import java.nio.charset.CharsetDecoder -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ @kotlin.internal.InlineOnly public actual inline fun print(message: Any?) { System.out.print(message) } -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun print(message: Int) { System.out.print(message) } -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun print(message: Long) { System.out.print(message) } -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun print(message: Byte) { System.out.print(message) } -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun print(message: Short) { System.out.print(message) } -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun print(message: Char) { System.out.print(message) } -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun print(message: Boolean) { System.out.print(message) } -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun print(message: Float) { System.out.print(message) } -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun print(message: Double) { System.out.print(message) } -/** Prints the given message to the standard output stream. */ +/** Prints the given [message] to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun print(message: CharArray) { System.out.print(message) } -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ @kotlin.internal.InlineOnly public actual inline fun println(message: Any?) { System.out.println(message) } -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun println(message: Int) { System.out.println(message) } -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun println(message: Long) { System.out.println(message) } -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun println(message: Byte) { System.out.println(message) } -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun println(message: Short) { System.out.println(message) } -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun println(message: Char) { System.out.println(message) } -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun println(message: Boolean) { System.out.println(message) } -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun println(message: Float) { System.out.println(message) } -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun println(message: Double) { System.out.println(message) } -/** Prints the given message and newline to the standard output stream. */ +/** Prints the given [message] and the line separator to the standard output stream. */ @kotlin.internal.InlineOnly public inline fun println(message: CharArray) { System.out.println(message) } -/** Prints a newline to the standard output stream. */ +/** Prints the line separator to the standard output stream. */ @kotlin.internal.InlineOnly public actual inline fun println() { System.out.println()