CsvParser
public static class CsvParserHand-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.
Methods
Section titled “Methods”
Parse(string, CsvParseOptions)
Section titled “Parse(string, CsvParseOptions)”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
DetectDelimiter(string, CsvParseOptions)
Section titled “DetectDelimiter(string, CsvParseOptions)”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