public string[] ParseRow(string rowString, int columnCount) { RowStringInfo rowStringInfo = new RowStringInfo(rowString, columnCount); this.ParsingFunction = Start; while (!this.ParsingFunction(rowStringInfo)) { ; } return(rowStringInfo.ColumnValues); }
private bool Start(RowStringInfo rowStringInfo) { switch (rowStringInfo.GetCurrentCharacterAsLower()) { // Unicode string value case 'n': { // Check whether n character is followed by a single quote if (rowStringInfo.TryPreviewNextCharacter(out char nextCharacter) && nextCharacter == '\'') { this.ParsingFunction = this.QuotedValueCapture; rowStringInfo.CurrentStringIndex += 2; }