Occurs3 Function | |
Return the number of times a substring occurs in a string, starting at a specified position.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax FUNCTION Occurs3(
cSearch AS STRING,
cTarget AS STRING,
dwOffset AS DWORD
) AS DWORD
public static uint Occurs3(
string cSearch,
string cTarget,
uint dwOffset
)
Request Example
View SourceParameters
- cSearch
- Type: String
The substring to search for. - cTarget
- Type: String
The string in which to search. - dwOffset
- Type: DWord
The position in the string at which to start searching.
A value of zero (0) specifies the first byte.
Return Value
Type:
DWord
The number of times that
cSearch appears in
cTarget.
Remarks
Occurs3() is the same as Occurs(), except that you can specify an offset that tells where to start searching. See Occurs() for more information.
Examples
This example show typical use of Occurs3():
1LOCAL cSearch AS STRING
2LOCAL cTarget AS STRING
3cSearch := "any"
4cTarget := "Anything goes anyway anytime."
5? Occurs3(cSearch,cTarget,18)
See Also