Handbook
Glossary
load-data-file ( filename -- data )
Parsing simple flat files
Prev:
load-interval-file ( filename -- table )
Vocabulary
simple-flat-file
Inputs
filename
a
string
Outputs
data
an
array
Word description
This loads a file that's delineated by semicolons and lines, returning an array of lines, where each line is an array split by the semicolons, with whitespace trimmed off.
Definition
USING:
io.encodings.utf8
io.files
sequences
;
IN:
simple-flat-file
:
load-data-file
( filename -- data )
utf8
file-lines
drop-comments
[
split-;
]
map!
;