until

Truncates a line read by the readln command.

Syntax

readln until "regexp" variable

Comments

The current line in the data file is stored in a buffer. The buffer is searched for regexp. If it is found, the line from that point on is deleted from the buffer. The remaining contents of the buffer are then copied to the string variable.

Example

readln until "//" longname   // read a request name, ignore a C++ style comment