-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
Description
Hi,
Great clean library that works except for one flaw, the option to remove white space needs to be optional so that empty values between delimiters match up to the headers, without that it is impossible to know which data value goes with which header column, assuming the first line in csv file is the header column names.
The line to remove the white space in this method should be made optional with a bool parameter.
private static ICollection<string> ProcessLine(string original_line, string? separator)
{
List<string> wordsInLine = original_line
.Split(separator?.ToCharArray())
.Select(str => str.Trim()).ToList();
wordsInLine.RemoveAll(string.IsNullOrWhiteSpace); // Probably not needed, but just in case
return wordsInLine;
}