readln

expect fun readln(): String(source)

Reads a line of input from the standard input stream and returns it, or throws a RuntimeException if EOF has already been reached when readln is called.

LF or CRLF is treated as the line terminator. Line terminator is not included in the returned string.

Currently this function is not supported in Kotlin/JS and throws UnsupportedOperationException.

Since Kotlin

1.6
actual fun readln(): String(source)

Since Kotlin

1.6
actual fun readln(): String(source)

Reads a line of input from the standard input stream and returns it, or throws a RuntimeException if EOF has already been reached when readln is called.

LF or CRLF is treated as the line terminator. Line terminator is not included in the returned string.

The input is decoded using the system default Charset. A CharacterCodingException is thrown if input is malformed.

Since Kotlin

1.6
actual fun readln(): String(source)

Reads a line of input from the standard input stream and returns it, or throws a RuntimeException if EOF has already been reached when readln is called.

LF or CRLF is treated as the line terminator. Line terminator is not included in the returned string.

The input is interpreted as UTF-8. Invalid bytes are replaced by the replacement character '\uFFFD'.

Since Kotlin

1.6
actual fun readln(): String(source)

Since Kotlin

1.8
actual fun readln(): String(source)

Since Kotlin

1.8