This functions executes the callback function for each element in the string.
stringMap(string,callback)
→ returns string
string.map(callback)
arrayMap()
.
Map each element of the string to a new value.
letters="abcdefg";
closure=function(inp){return chr(asc(inp)+7);}
writeOutput(StringMap(letters,closure));
Expected Result: hijklmn
Map each element of the string to a new value.
letters="abcdefg";
closure=function(inp){return chr(asc(inp)+7);}
writeOutput(letters.map(closure));
Expected Result: hijklmn
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.