DotNetWikiBot Framework Documentation
This auxiliary function returns part of the string which begins with some specified substring and ends with some specified substring.

Namespace: DotNetWikiBot
Assembly: DotNetWikiBot (in DotNetWikiBot.dll) Version: 0.0.0.0

Syntax

C#
public static string GetSubstring(
	string src,
	string startTag,
	string endTag,
	bool removeStartTag,
	bool removeEndTag,
	bool raiseExceptionIfTagNotFound
)

Parameters

src
Type: System..::..String
Source string.
startTag
Type: System..::..String
Substring that the resultant string must begin with. Can be null or empty, in this case the source string is returned from the very beginning.
endTag
Type: System..::..String
Substring that the resultant string must end with. Can be null or empty, in this case the source string is returned to the very end.
removeStartTag
Type: System..::..Boolean
If true, startTag is not included into returned substring. Default is false.
removeEndTag
Type: System..::..Boolean
If true, endTag is not included into returned substring. Default is false.
raiseExceptionIfTagNotFound
Type: System..::..Boolean
When set to true, raises ArgumentOutOfRangeException if specified startTag or endTag was not found. Default is true.

Return Value

Type: String
Part of the source string.

See Also