From 9e462ace70abddcb612d3264c9dd17e284027b7f Mon Sep 17 00:00:00 2001 From: mklueh90 Date: Sat, 27 Feb 2021 17:17:57 +0100 Subject: [PATCH] dealing with missing cells using tab delimiter --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d1e860f..9b4f48b 100644 --- a/README.md +++ b/README.md @@ -7,23 +7,23 @@ Very tiny Java CSV parser based on Java 8 Streaming API and Lombok that is simpl ```java Path path = Path.of("some-file.csv"); -SexyCSV parser=SexyCSV.builder() +SexyCSV parser = SexyCSV.builder() .delimiter(",") .hasHeader(true) //auto-use of the given header //.header(Arrays.asList("id", "name", "age", "country")) set manual headers .skipRows(3) -.rowFilter(s->s.matches("^\\d.*")) //we are only interested in rows that start with a number +.rowFilter(s -> s.matches("^\\d.*")) //we are only interested in rows that start with a number //.tokenizer(s -> s.split(";")) optional custom tokenizer .build(); -List data=parser.parse(path) +List data = parser.parse(path) .collect(Collectors.toList()); -Row firstRow=data.get(0); +Row firstRow = data.get(0); // Access cells -String a=row.get(1); -String b=row.get("columnName") +String a = row.get(1); +String b = row.get("columnName") ```