Click or drag to resize

At2 Function

X#
Return the position of the first occurrence of a substring within a string.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax
 FUNCTION At2(
	cSearch AS STRING,
	cTarget AS STRING
) AS DWORD
Request Example View Source

Parameters

cSearch
Type: String
The substring for which to search.
cTarget
Type: String
The string in which to search. (To start at a specific offset, use At3().)

Return Value

Type: DWord
The position of the first occurrence of cSearch within cTarget.
If cSearch is not found, At2() returns 0.
Remarks
At2() is like At() except that it returns a WORD. See At() for more information.
Examples