JuliaLang/julia — pull request #5403 by tanmaykm (2014-01-15 10:26:04+00:00)
Title: Added readdlm option to ignore empty columns.

This adds a new option `ignore_empty_columns` for readdlm. Setting this to `true` results in adjoining column delimiters being squashed instead of resulting in a cell with empty string. This option can be used to read fixed width format data files.

e.g: with delimiter set to default (whitespace), and `ignore_empty_columns` set to false (default):
````
julia> iob = IOBuffer(" 1 2 3 4\n 11 12 13 14");

julia> readdlm(iob)
2x9 Array{Any,2}:
"" " " 1.0 "" 2.0 "" 3.0 "" 4.0
"" 11.0 12.0 13.0 "" "" "" "" 14.0
````

With `ignore_empty_columns` set to true:
````
julia> iob = IOBuffer(" 1 2 3 4\n 11 12 13 14");

julia> readdlm(iob; ignore_empty_columns=true)
2x4 Array{Float64,2}:
1.0 2.0 3.0 4.0
11.0 12.0 13.0 14.0
````

Also updated tests and docs for this option and added some new tests for `utf8` strings.