Microsoft.VisualBasic.FileIO.TextFieldParser
private IEnumerable<string> SplitCsvText(string input) { var result = new List<string>(); var insideQuotes = false; var pos1 = 0; for (int i = 0; i < input.Length; i++) { if (input[i] == quote) { insideQuotes = !insideQuotes; } else if (input[i] == comma && !insideQuotes) { var item = input.Substring(pos1, i - pos1).Trim(); if (item.Length > 0) result.Add(item); pos1 = i + 1; } } return result; }
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.