readLine

Reads a line of input from the standard input stream.

This function is obsolete and will be deprecated soon. Consider using readln or readlnOrNull depending on how the end of the input stream should be handled.

Since Kotlin

1.0

Return

the line read or null if the input stream is redirected to a file and the end of file has been reached.

external fun readLine(): String?(source)

Deprecated

Warning since 2.1

Use `readln()` instead of `readLine()!!`, and `readlnOrNull()` instead of `readLine()`.

Reads a line of input from the standard input stream.

Since Kotlin

1.3

Return

the line read or null if the input stream is redirected to a file and the end of file has been reached.