[
https://issues.apache.org/jira/browse/CSV-206?focusedWorklogId=646345&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-646345
]
ASF GitHub Bot logged work on CSV-206:
--------------------------------------
Author: ASF GitHub Bot
Created on: 03/Sep/21 14:52
Start Date: 03/Sep/21 14:52
Worklog Time Spent: 10m
Work Description: san4you88 commented on pull request #76:
URL: https://github.com/apache/commons-csv/pull/76#issuecomment-912598323
Am not able to create PR now due to access issue
here is the test
```
org.apache.commons.csv.CSVParserTest#testParseWithDoublePipeDelimiter
@Test
public void testParseWithDoublePipeDelimiter() throws Exception {
final Reader in = new StringReader("a||b||c||d||||f");
StringBuilder stringBuilder = new StringBuilder();
try (CSVPrinter csvPrinter = new CSVPrinter(stringBuilder,
CSVFormat.EXCEL);
CSVParser csvParser = CSVParser.parse(in,
CSVFormat.Builder.create().setDelimiter("||").build())) {
for (CSVRecord csvRecord : csvParser) {
for (int i = 0; i < csvRecord.size(); i++) {
csvPrinter.print(csvRecord.get(i));
}
assertEquals("a,b,c,d,,f", stringBuilder.toString());
}
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 646345)
Time Spent: 3h 20m (was: 3h 10m)
> Add support for String delimiters #76
> -------------------------------------
>
> Key: CSV-206
> URL: https://issues.apache.org/jira/browse/CSV-206
> Project: Commons CSV
> Issue Type: Improvement
> Reporter: jefferyyuan
> Priority: Major
> Labels: commons, commons-csv, csv, csvparser
> Fix For: 1.9.0
>
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
> It's not uncommon that we use multiple-characters delimiter to separate
> columns in CVS: such as: [|]
> Sometimes, we have no choice as third-party defines the csv format like that.
> It would be great if apache commons.csv supports this function.
> I did some google search: seems there is no java library that supports use
> multiple-characters as the column separator.
> But the C# CsvHelper does
> https://github.com/JoshClose/CsvHelper
--
This message was sent by Atlassian Jira
(v8.3.4#803005)