parseutils added
This commit is contained in:
parent
262a47887d
commit
e22c73fd89
7 changed files with 292 additions and 221 deletions
|
|
@ -1460,6 +1460,13 @@ when not defined(EcmaScript) and not defined(NimrodVM):
|
|||
yield res
|
||||
Close(f)
|
||||
|
||||
iterator lines*(f: TFile): string =
|
||||
## Iterate over any line in the file `f`.
|
||||
var res = ""
|
||||
while not endOfFile(f):
|
||||
rawReadLine(f, res)
|
||||
yield res
|
||||
|
||||
proc fileHandle*(f: TFile): TFileHandle {.importc: "fileno",
|
||||
header: "<stdio.h>"}
|
||||
## returns the OS file handle of the file ``f``. This is only useful for
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue