readstr - reads a string from a file
file.readstr()
Reads UTF-8 characters from the specified file until end-of-line
(or until an imnplementation-defined maximum number of characters has
been read). If the optional file is not specified, reads from
io::Input
. Unread characters remain buffered by
the operating system.
A String or WideString is returned, depending on whether any characters with encoding greater than 127 were read.
EndOfFile
if there are no more characters to
be read from the given file
UTF8Check
if
an illegal UTF-8 byte is read from a text-mode file
proc main() { try { while (true) { var str = readstr(); "", str, '\n'; } } catch (e) { "", e, '\n'; } }