Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor/reverts-read-raw-sep-char #77

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RecordParser.Benchmark/VariableLengthReaderBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void Read_VariableLength_RecordParser_Raw(bool parallel, bool quoted)
ContainsQuotedFields = quoted,

ColumnCount = 8,
Separator = ',',
Separator = ",",
StringPoolFactory = () => new InternPool().Intern
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public class VariableLengthReaderRawOptions
public int ColumnCount { get; set; }

/// <summary>
/// The character that delimits columns and separate values.
/// The text (usually a character) that delimits columns and separate values.
/// </summary>
public char Separator { get; set; }
public string Separator { get; set; }

/// <summary>
/// Options to configure parallel processing
Expand Down Expand Up @@ -106,7 +106,7 @@ private static Get BuildRaw(int collumnCount, bool hasTransform, bool trim)
public static IEnumerable<T> ReadRecordsRaw<T>(this TextReader reader, VariableLengthReaderRawOptions options, Func<Func<int, string>, T> parser)
{
var get = BuildRaw(options.ColumnCount, options.StringPoolFactory != null, options.Trim);
var sep = options.Separator.ToString();
var sep = options.Separator;

Func<IFL> func = options.ContainsQuotedFields
? () => new RowByQuote(reader, Length, sep)
Expand Down
Loading