FT_FINDITH

FT_FINDITH()
 Find the "ith" occurrence of a substring within a string

 Syntax

      FT_FINDITH( <cCheckFor>, <cCheckIn>, <nWhichOccurrence> ;
                  [, <lIgnoreCase> ] ) -> <nStringPosition>

 Arguments

     <cCheckFor> is the string to search for.

     <cCheckIn> is the string to search.

     <nWhichOccurrence> is the number of the occurrence to find.

     <lIgnoreCase> is a logical indicating if the search is to be case
        sensitive.  The default is no case sensitivity (.F.).

 Returns

     The position in the string cCheckIn of the ith occurrence of cCheckFor.

 Description

     This function finds the position in a string of the "ith" time another
     string appears in it.

 Examples

     // Find the Position in cMemoString of
     // the 10th Occurrence of "the", case
     // insensitive

     nNextPosition := FT_FINDITH("the", cMemoString, 10)

 Source: FINDITH.PRG

 Author: David Husnian

See Also: FT_AT2()

 

FT_BYTEXOR

FT_BYTEXOR()
 Perform bit-wise XOR on two ASCII characters (bytes)

 Syntax

      FT_BYTEXOR( <cByte1>, <cByte2> ) -> cNewByte

 Arguments

     <cByte1> and <cByte2> are characters from CHR(0) to CHR(255).
     May be passed in CHR() form, as character literals, or
     as expressions evaluating to CHR() values.

 Returns

     Returns resulting byte, in CHR() form.  If parameters are faulty,
     returns NIL.

 Description

     Can be used for bit-wise byte manipulation.  In effect, this is a
     bit-by-bit XOR operation.  Equivalent to XOR assembler instruction.

     This function is presented to illustrate that bit-wise operations
     are possible with Clipper code.  For greater speed, write .C or
     .ASM versions and use the Clipper Extend system.

 Examples

     This code performs a bit-wise XOR on two bytes represented
     by CHR(32) and CHR(55):

          cNewByte := FT_BYTEXOR( CHR(32), CHR(55) )
          ? ASC( cNewByte )     // result: 23
          ? cNewByte            // result: non-printable character

     For a demonstration of Clipper bit manipulations, compile and
     link the program BITTEST.PRG in the Nanforum Toolkit source code.

 Source: BYTEXOR.PRG

 Author: Forest Belt, Computer Diagnostic Services, Inc.

See Also: FT_BYTEOR() FT_BYTENOT() FT_BYTENEG() FT_BYTEAND()