PatternCountMultiCS ( Text ; SearchList )
A case sensitive version of my function PatternCountMulti
Average rating: 5.0 (1 vote) Log in to vote
flusheDData - Show more from this author
n/a http://www.udias.com |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
A case sensitive version of the funcion PatternCountMulti.
It uses the Substitute trick much used in Excel.
Comments
Richard Dyce, Dyce & Sons Ltd. Jun 2, 2020 |
||
Just a thought, but might it not be cleaner to use a While() instead of the recursion and the variables? e.g. While ( [ ~counter = 1 ; ~found = 0 ] ; ~counter <= ValueCount ( SearchList ) ; [ ~searchTerm = GetValue ( SearchList ; ~counter ) ; ~found = ~found + ( Length ( Text ) - Length ( Substitute ( Text ; ~searchTerm ; "" ) ) ) / Length ( ~searchTerm ) ; ~counter = ~counter + 1 ] ; ~found ) I keep meaning to go back through all my recursive CFs and change them to While()s . |
||
flusheDData, n/a Jun 2, 2020 |
||
Hi Richard and thank you so much for your feedback. Yes, I consider the while function very interesting, in fact I am using it on a daily basis. Anyway, I do not mean to change my funcions to the while version as they are very portable and compatible with previous FMP versions. I usually tend to make most of my solutions as much backwards compatible as posible. Best regards, Miguel |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.