method
readLineSync

String readLineSync(
{Encoding encoding: SYSTEM_ENCODING,
bool retainNewlines: false}
)

Synchronously read a line from stdin. This call will block until a full line is available.

The argument encoding can be used to changed how the input should be decoded. Default is SYSTEM_ENCODING.

If retainNewlines is false, the returned String will not contain the final newline. If true, the returned String will contain the line terminator. Default is false.

If end-of-file is reached after any bytes have been read from stdin, that data is returned. Returns null if no bytes preceeded the end of input.