AT()
Locates the position of a substring in a main string.
Syntax
AT( <cSearch>, <cString>, [<nStart>], [<nEnd>] ) --> nPos
Arguments
<cSearch> Substring to search for
<cString> Main string
<nStart> First position to search in cString, by default 1
<nEnd> End position to search, by default cString length
Returns
AT() return the starting position of the first occurrence of the substring in the main string
Description
This function searches the string <cString> for the characters in the first string <cSearch>. If the substring is not contained within the second expression, the function will return 0. The third and fourth parameters lets you indicate a starting and end offset to search in.
Examples
? 'At( "cde", "abcdefgfedcba" ) = ' +; At( "cde", "abcsefgfedcba" )
Compliance
This function is sensitive to HB_CLP_STRICT settings during the compilation of src/rtl/at.c
<nStart> and <nEnd> are Harbour extensions and do not exist if HB_CLP_STRICT is defined. In that case, the whole string is searched.
Platforms
All
Files
Library is rtl
Seealso
RAT()
Pingback: Harbour All Functions — A | Viva Clipper !
Pingback: Harbour String Functions | Viva Clipper !
Pingback: Harbour RG Summary | Viva Clipper !