StringParserParseStandardCSV Method

Parses a line based on a comma as the separator. Commas wrapped in matched double quotes are not separators. Matched double quotes are normally removed prior to field return. Fields are NOT trimmed of white spaces prior to return.

Definition

Namespace: Gemstone.IO.Parsing
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.190 -- Release Build+4f7f1aafd7d11323546b3aa1b5f0d7a271c76461
public static string[]? ParseStandardCSV(
	string inString,
	int startIndex = 0,
	bool removeResultQuotes = true
)

Parameters

inString  String
The string to parse.
startIndex  Int32  (Optional)
The index in the line from which to start parsing.
removeResultQuotes  Boolean  (Optional)
Set to TRUE to unwrap quotes in returned array vis-a-vis Excel.

Return Value

String
An array of the parsed strings (the fields within the line)

Remarks

The string.split method is about 4 times faster.

See Also