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
Tag Archives: FT_FINDITH()
FT_NOOCCUR
FT_NOOCCUR() Find the number of times one string occurs in another Syntax FT_NOOCCUR( <cCheckFor>, <cCheckIn> ; [, <lIgnoreCase> ] ) -> <nOccurrences> Arguments <cCheckFor> is the string to search for <cCheckIn> is the string to search <lIgnoreCase> is a boolean variable to force case sensitivity (optional, defaults to .F.). Returns The number of times <cCheckFor> appears in <cCheckIn> Description This function finds the number of times a string occurs in a second string. Examples // Find the number of times "the" appears in cMemoString, case // insensitive nNoOfOccurrences := FT_NOOCCUR( "the", cMemoString ) // Find the number of times "the" appears in cMemoString, case // sensitive nNoOfOccurrences := FT_NOOCCUR( "the", cMemoString, TRUE ) Source: NOOCCUR.PRG Author: David Husnian
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()