This function calls a given closure/function with every element in a given string and returns true as soon as the callback condition is met.
stringSome(inputString,callback)
→ returns boolean
inputString.some(callback)
some()
functions.
Are any of the characters in the string greater than our condition?
instring="abcdefg";
callback=function(inp){return inp > "f"}
writeoutput(StringSome(instring,callback));
Expected Result: YES
Are any of the characters in the string greater than our condition?
instring="abcdefg";
callback=function(inp){return inp > "f"}
writeoutput(instring.some(callback));
Expected Result: YES
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.