tabularArray

Loads a delimited text file, line-by-line, parses the line into fields, returns an array of fields.

Select!(Types.length == 1, Types[0][], Tuple!(Types)[])
tabularArray
(
char delimiter
Types...
)
(
string filename
)

Return Value

Type: Select!(Types.length == 1, Types[0][], Tuple!(Types)[])

On success, returns an array of tuples, based on template parameters.

Throws

std.std.exception.Exception. on failure to correctly parse a line. std.std.file.FileException. on I/O failures.

Examples

// Load a text file, tab-delimited, with three numeric columns.

auto data = tabularArray!('\t', int,int,int)("file.txt");

// data[0] will be of type Tuple!(int,int,int)

Meta