* Read line from stdin.
*
* This version manages its own read buffer, which means one memory allocation per call. If you are not
* retaining a reference to the read data, consider the readln(buf) version, which may offer
* better performance as it can reuse its read buffer.
*
* Returns:
* The line that was read, including the line terminator character.
* Params:
* S = Template parameter; the type of the allocated buffer, and the type returned. Defaults to string.
* terminator = Line terminator (by default, '\n').
* Note:
* String terminators are not supported due to ambiguity with readln(buf) below.
* Throws:
* StdioException on I/O error, or UnicodeException on Unicode conversion error.
* Example:
* Reads stdin and writes it to stdout.
* Read line from stdin. * * This version manages its own read buffer, which means one memory allocation per call. If you are not * retaining a reference to the read data, consider the readln(buf) version, which may offer * better performance as it can reuse its read buffer. * * Returns: * The line that was read, including the line terminator character. * Params: * S = Template parameter; the type of the allocated buffer, and the type returned. Defaults to string. * terminator = Line terminator (by default, '\n'). * Note: * String terminators are not supported due to ambiguity with readln(buf) below. * Throws: * StdioException on I/O error, or UnicodeException on Unicode conversion error. * Example: * Reads stdin and writes it to stdout.