Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_at2()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_AT2()
 Find position of the nth occurrence of a substring
------------------------------------------------------------------------------

 Syntax

      FT_AT2( <cSearch>, <cTarget> [, <nOccurs> [, <lCaseSens> ] ] ) -> nPos

 Arguments

     <cSearch> is the character substring to search for.

     <cTarget> is the character string to search.

     <nOccurs> is the occurrence of cSearch to look for,
                defaults to 1.

     <lCaseSens> is a logical value denoting case sensitivity.
                If .F., then search is NOT sensitive to case,
                defaults to .T.

 Returns

     The position of the nth occurrence of a substring

 Description

     This function will find the nth occurrence of a substring
     within a string.

 Examples

     cSearch := "t"
     cTarget := "This is the day that the Lord has made."

     FT_AT2( cSearch, cTarget )            // Returns ( 9 )

     FT_AT2( cSearch, cTarget, 2 )         // Returns ( 17 )

     FT_AT2( cSearch, cTarget, 2, .F. )    // Returns ( 9 )

 Source: AT2.PRG

 Author: Ralph Oliver,  TRANSCOM SYSTEMS

See Also: FT_FINDITH()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson