FT String

 FT_AT2()         Find position of the nth occurrence of a substring
 FT_BITCLR()      Clear (reset) selected bit in a byte
 FT_BITSET()      Set selected bit in a byte
 FT_BYTEAND()     Perform bit-wise AND on two ASCII characters (bytes)
 FT_BYTENEG()     Perform bit-wise negation on an ASCII character
 FT_BYTENOT()     Perform bit-wise NOT on an ASCII character (byte)
 FT_BYTEOR()      Perform bit-wise OR on two ASCII characters (bytes)
 FT_BYTEXOR()     Perform bit-wise XOR on two ASCII characters (bytes)
 FT_FINDITH()     Find the "ith" occurrence of a substring within a string
 FT_ISBIT()       Test the status of an individual bit
 FT_ISBITON()     Determine the state of individual bits in a number
 FT_METAPH()      Convert a character string to MetaPhone format
 FT_NOOCCUR()     Find the number of times one string occurs in another
 FT_PCHR()        Convert printer control codes
 FT_PROPER()      Convert a string to proper-name case

FT_PROPER

FT_PROPER()
 Convert a string to proper-name case

 Syntax

      FT_PROPER( <cString> ) -> cProperName

 Arguments

     <cString> is the string to be converted.

 Returns

     A string of the same length as <cString>, only converted to
     proper name case (upper/lower case).

 Description

     FT_PROPER() uses a brute-force algorithm to convert a string
     to propername case.  First, it capitalizes the first letter of
     all words starting after a blank, dash, or apostrophe.  This
     catches most names, including special cases such as names
     beginning with O' (O'Malley, O'Reilly) and hyphenated names
     (such as Susan Chia-Mei Lo).

     Next, it does a specific adjustment for words beginning in "Mc"
     It finds the first 'Mc' and capitalizes the next character after
     it.  It does this for all occurrences of Mc.

     The original FT_PROPER() was written in Clipper by Glenn Scott
     and Mark Zechiel; it was re-written in C (and thus, optimized
     and enhanced) by Robert DiFalco.

 Examples

       FUNCTION main( cStr )
         OutStd( FT_PROPER( cStr ) + chr(13) + chr(10) )
       RETURN ( nil )

 Source: PROPER.C

 Author: Robert DiFalco and Glenn Scott

 

FT_METAPH

FT_METAPH()
 Convert a character string to MetaPhone format

 Syntax

      FT_METAPH( <cName> [, <nSize> ] ) -> cMetaPhone

 Arguments

     <cName> is the character string to convert

     <nSize> is the length of the character string to be returned.
             If not specified the default length is 4 bytes.

 Returns

     A phonetically spelled character string

 Description

     This function is a character function use to index and search for
     sound-alike or phonetic matches.  It is an alternative to
     the SOUNDEX() function, and addresses some basic pronunciation
     rules, by looking at surrounding letters to determine how parts of
     the string are pronounced.  FT_METAPH() will group sound-alikes
     together, and forgive shortcomings in spelling ability.

 Examples

     USE Persons
     INDEX ON FT_METAPH( LastName ) TO LastName
     SEEK FT_METAPH( "Philmore" )
     ? FOUND(), LastName             // Result: .T. Philmore
     SEEK FT_METAPH( "Fillmore" )
     ? FOUND(), LastName             // Result: .T. Philmore

 Source: METAPH.PRG

 Author: Dave Adams