import ddn.data.csv;
const text = "id,name\n1,Ada\n";
auto it = byRows(text);
auto header = it.front;
auto hidx = makeHeaderIndex(header);
it.popFront();
auto row = it.front; row.attachHeader(&hidx);
auto nameField = row.byName("name");
assert(nameField.isOk && nameField.value.toString() == "Ada");RowView.byName
Lookup a field by column name using the attached header index.
Returns CsvResult!FieldView holding the field on success. Errors:
HEADER_NOT_ATTACHEDwhen no header index has been attached.INVALID_COLUMNwhen the provided name is not present in the header.Examples