Adding file reading line by line in nim

This commit is contained in:
rsirres 2016-12-27 13:39:15 +01:00
parent 2b10336e6c
commit a05e787132
1 changed files with 5 additions and 0 deletions

View File

@ -209,4 +209,9 @@ See [this](http://rosettacode.org/wiki/Abstract_type#Nim)
var is_happy = if has_cat(): "quite" else: "not much"
```
### Reading files line by line
``` Nim
for line in lines "yourfile.txt":
echo line
```