C-DEngine 5.105

TheCommonUtils..::..GetStringSection Method

Retrieves a section of a string given the parameter of this function. Can be used to parse HTML or other string snippets.

Namespace:  nsCDEngine.BaseClasses
Assembly:  C-DEngine (in C-DEngine.dll)


public static string GetStringSection(
	string pSource,
	ref int pStartPos,
	string pFrom,
	string pTo,
	bool IgnoreStartEnd
Public Shared Function GetStringSection ( _
	pSource As String, _
	ByRef pStartPos As Integer, _
	pFrom As String, _
	pTo As String, _
	IgnoreStartEnd As Boolean _
) As String
static String^ GetStringSection(
	String^ pSource, 
	int^% pStartPos, 
	String^ pFrom, 
	String^ pTo, 
	bool^ IgnoreStartEnd


Type: String
Source string to be parsed
Type: Int32%
Start Position in the string to start searching. After the search the END position will be returned in this parameter to allow continuous search in large texts
Type: String
Matching patter to seach for
Type: String
Matching end of the pattern to search for. All between the start and end pattern will be returned.
Type: Boolean
Default: true. If false, the function returns if either pFrom or pTo was not found in the pSource string

Return Value

The requested substring, or null on error.