FT_AT2

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()



 

One response to “FT_AT2

  1. Pingback: FT String | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.