PatternCount()

 <  Day Day Up  >  

PatternCount()

Category: Text

Syntax: PatternCount (text ; searchString)

Parameters: text ”any expression that resolves to a text string; searchString ”any expression that resolves to a text string, representing the substring for which you want to search within the text string.

Description: Returns the number of times that searchString appears in the text string. PatternCount() returns if the searchString is not found.

Examples:

 

 PatternCount ("This is a test"; "is") 

Returns 2 .

 

 PatternCount (WindowNames; "") + 1 

Returns the number of carriage returns in the list returned by the WindowNames() function. This could be used to determine the number of windows that are available. The ValueCount() function could also be used for this purpose.

 

 PatternCount ("abababa" ; "Aba") 

Returns 2 .

Comments:

Only non-overlapping occurrences of searchString are counted by PatternCount() . PatternCount() is not case sensitive.

Even though PatternCount() is designed to answer the question "how many?", it is often used simply to determine whether one string is contained within another. If it returns any value other than zero, the search string is found.

 <  Day Day Up  >  


QUE CORPORATION - Using Filemaker pro X
QUE CORPORATION - Using Filemaker pro X
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 494

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net