|
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.ParsingAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax public static string GetBetweenDelimiters(
string inString,
out int payloadIndex,
char startToken = ',',
char endToken = ',',
int startIndex = 0,
bool matchCase = true,
bool includeTokensInReturn = false
)
Public Shared Function GetBetweenDelimiters (
inString As String,
<OutAttribute> ByRef payloadIndex As Integer,
Optional startToken As Char = ","C,
Optional endToken As Char = ","C,
Optional startIndex As Integer = 0,
Optional matchCase As Boolean = true,
Optional includeTokensInReturn As Boolean = false
) As String
static member GetBetweenDelimiters :
inString : string *
payloadIndex : int byref *
?startToken : char *
?endToken : char *
?startIndex : int *
?matchCase : bool *
?includeTokensInReturn : bool
(* Defaults:
let _startToken = defaultArg startToken ','
let _endToken = defaultArg endToken ','
let _startIndex = defaultArg startIndex 0
let _matchCase = defaultArg matchCase true
let _includeTokensInReturn = defaultArg includeTokensInReturn false
*)
-> string
GSF.Parsing.StringParser.GetBetweenDelimiters = function(inString, payloadIndex, startToken, endToken, startIndex, matchCase, includeTokensInReturn);
View SourceParameters
- 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
StringA string, and the string starting index (payload Index)
See Also