FindDuplicateCharacters ( string )
Returns True if the given string
Average rating: 5.0 (1 vote) Log in to vote
RealGrouchy - Show more from this author
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
There are plenty of functions out there to find and manipulate unique or duplicate values within a given list of ¶ delimited values, but I couldn't find anything that looked for duplicate *characters* within a string. I whipped this one up.
It's simple enough but I figured I'll upload it for the next person who goes looking for it. It took me more time to look for it than to recreate it because I assumed there *must* be one out there! There probably is one and I just didn't use the right search terms.
Jun 11, 2018
would be better if
now this function get into infinite loop if parameter is shorter than 1 character (then get ? as result).
Jun 11, 2018
|Good catch. I've submitted the change!
|Tom Hays, Virgina, USA
Aug 17, 2018
|If the characters in the string are limited to a specific range/set of characters that you can specify explicitly, e.g. 0-9a-zA-Z, then you can write this in a closed form without needing recursion.
alphanum = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
Length(Filter(alphanum; string)) <> Length(string)
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.