ATCLine Function | |
Return the line number of the first occurrence of a substring within a multiple line string, without regard for case.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax FUNCTION ATCLine(
cSearch AS STRING,
cTarget AS STRING
) AS DWORD
public static uint ATCLine(
string cSearch,
string cTarget
)
Request Example
View SourceParameters
- cSearch
- Type: String
The substring to search for. - cTarget
- Type: String
The string in which to search.
Return Value
Type:
DWord
The position of the first occurrence of
cSearch within
cTarget.
If
cSearch is not found, AtCLine() returns 0.
Remarks
If you only need to know whether a substring exists within another string, use the InStr() function or the $ operator.
Examples
These examples show typical use of AtCLine():
1LOCAL cBigString AS STRING
2cBigString := "This is the first line" + ;
3 CRLF + "This is the second line" + ;
4 CRLF + "This is the third line"
5? AtCLine("tHiRd", cBigString)
See Also