January 19, 2017 [Issue 17109] New: std.csv chokes on empty columns when parsing to struct | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17109 Issue ID: 17109 Summary: std.csv chokes on empty columns when parsing to struct Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody@puremagic.com Reporter: jack@jackstouffer.com import std.csv; import std.typecons; import std.stdio; static immutable csv_string = "aaa,1.1,bbb\nstring,,another string"; void main() { foreach(record; csvReader!(Tuple!(string, float, string))(csv_string)) { writeln(record[0], record[1], record[2]); } } std.csv.CSVException@/opt/compilers/dmd2/include/std/csv.d(1096): Floating point conversion error for input "". It should return T.init when it encounters an empty string. -- |
Copyright © 1999-2021 by the D Language Foundation