Click or drag to resize

Occurs2 Function

Return the number of times a substring occurs in a string.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.2a
Syntax
 FUNCTION Occurs2(
	cSearch AS STRING,
	cTarget AS STRING
) AS DWORD
View Source

Parameters

cSearch
Type: String
The substring for which to search.
cTarget
Type: String
The string in which to search.  (To specify an offset, use Occurs3()).

Return Value

Type: UInt32
The number of times that <cSearch> appears in <cTarget>.
Remarks
Occurs2() is the same as Occurs() except Occurs2() returns a WORD.  See Occurs() for more information.
Examples