|
StringParserParseLine Method
|
Parses a line based on a collection of quote and delimiter characters,
Namespace: GSF.ParsingAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax public static string[] ParseLine(
string inString,
char[] quoteChars,
char[] delimiters,
int startIndex = 0,
bool removeResultQuotes = true
)
Public Shared Function ParseLine (
inString As String,
quoteChars As Char(),
delimiters As Char(),
Optional startIndex As Integer = 0,
Optional removeResultQuotes As Boolean = true
) As String()
public:
static array<String^>^ ParseLine(
String^ inString,
array<wchar_t>^ quoteChars,
array<wchar_t>^ delimiters,
int startIndex = 0,
bool removeResultQuotes = true
)
static member ParseLine :
inString : string *
quoteChars : char[] *
delimiters : char[] *
?startIndex : int *
?removeResultQuotes : bool
(* Defaults:
let _startIndex = defaultArg startIndex 0
let _removeResultQuotes = defaultArg removeResultQuotes true
*)
-> string[]
GSF.Parsing.StringParser.ParseLine = function(inString, quoteChars, delimiters, startIndex, removeResultQuotes);
View SourceParameters
- inString String
- The string to parse
- quoteChars Char
-
An array of characters to be used as the framing within fields or the "quote" characters. Quotes must matched.
Set to null to disable (split line at delimiter regardless of quotes).
- delimiters Char
- An array of characters to be used as delimiter characters. These characters have equal weight in breaking up the line.
- 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
StringAn array of the parsed strings
Remarks The string.split method is about 12 times faster.
See Also