Click or drag to resize

StringParserGetBetweenDelimiters Method

Returns the string that is between two delimiter strings beginning the first startDelimiter found. ALSO, returns the index of the payload (the index of the first char past the startDelimiter)

Namespace: GSF.Parsing
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.254-beta+b1c32a8191971a5ec09744a3eb270cb5508e892c
Syntax
public static string GetBetweenDelimiters(
	string inString,
	out int payloadIndex,
	char startToken = ',',
	char endToken = ',',
	int startIndex = 0,
	bool matchCase = true,
	bool includeTokensInReturn = false
)
View Source

Parameters

inString  String
The input string
payloadIndex  Int32
startToken  Char  (Optional)
The beginning token or delimiter
endToken  Char  (Optional)
The ending token or delimiter
startIndex  Int32  (Optional)
The index on which to begin searching inString
matchCase  Boolean  (Optional)
set to FALSE for case insensitive test for delimiters
includeTokensInReturn  Boolean  (Optional)
set to TRUE for the return string to include the opening and closing tokens.

Return Value

String
A string, and the string starting index (payload Index)
See Also