Hi, all
In CSV parsing, there are many scenarios where multiple characters are used as
separators,
To support this feature, we should change the char type of delimiter to String.
This will lead to
API changes, and old usage code may need to be modified to pass.
When parsing we can get the character array in advance through lookAhead(int n)
in the
ExtendedBufferedReader to determine whether it is a delimiter
char[] lookAhead(int n) throws IOException {
char[] buf = new char[n];
super.mark(n);
super.read(buf, 0, n);
super.reset();
return buf;
}
I have a little problem to confirm. The escape character is' \ ', when
delimiter is a char ','
printWithEscape print '\,' , so when delimiter is multiple characters "[|]"
printWithEscape
print ’“\[\|\]” or print "\[|]"? I'd prefer to print "\[\|\]". Is there more
any suggestion about
this feature ?
——
Chen Guoping