Skip to content

CsvParser

ClassChartGuruChartGuru
public static class CsvParser

Hand-rolled, allocation-conscious RFC 4180 CSV parser with delimiter auto-detection. Returns a ChartGuru.ChartTabularData. Handles quoted fields (including escaped “”), CR/LF/CRLF line endings, UTF-8 BOM, comment lines, and skipped rows.

public static ChartTabularData Parse(string text, CsvParseOptions options = null)

Parses the supplied text into a Csv Parser, applying its documented culture and fallback rules.

Parameters

Name Type
text System.String
options ChartGuru.CsvParseOptions

Returns

ChartGuru.ChartTabularData

public static char DetectDelimiter(string text, CsvParseOptions options)

Detect the most likely delimiter by counting occurrences of each candidate on the first 16 non-comment lines and picking the one with the highest consistent count.

Parameters

Name Type
text System.String
options ChartGuru.CsvParseOptions

Returns

System.Char