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)

Syntax


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
public:
static String^ GetStringSection(
	String^ pSource, 
	int^% pStartPos, 
	String^ pFrom, 
	String^ pTo, 
	bool^ IgnoreStartEnd
)

Parameters

pSource
Type: String
Source string to be parsed
pStartPos
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
pFrom
Type: String
Matching patter to seach for
pTo
Type: String
Matching end of the pattern to search for. All between the start and end pattern will be returned.
IgnoreStartEnd
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.