Whatever message this page gives is out now! Go check it out!
StringEach(String string, UDFMethod callback)Parameter | Description |
string | (Required) The input string. |
callback | (Required) Closure function executed for each element in the string. The syntax is: callback (element, index, string) |
<cfscript>
myCities="St. Petersburg"
callback=function(city){
WriteOutput(city & "<br/>")
}
StringEach(myCities,callback)
</cfscript><cfscript>
letters = "abcd"
callback=function(element,index){
writeOutput(#index#&":"&#element#&"<br/>")
}
StringEach(letters,callback)
</cfscript>