|
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.250-beta+e1aac152bf9c38c67035c6d283461f222e39e02a
Syntaxpublic 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
public:
static String^ GetBetweenDelimiters(
String^ inString,
[OutAttribute] int% payloadIndex,
wchar_t startToken = L',',
wchar_t endToken = L',',
int startIndex = 0,
bool matchCase = true,
bool includeTokensInReturn = false
)
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