Interestingly, you can do something similar using the .split () java method and get similar results.
A bit of background: since CF is built on Java, it can take advantage of many basic java methods and classes. According to Rupesh Kuman from Adobe (http://coldfused.blogspot.com/2007/01/extend-cf-native-objects-harnessing.html), the CF array is an implementation of java.util.List, so all lists are also available for CF arrays. One of the most useful is the .split () method. This takes a string and turns it into an array based on an arbitrary delimiter of 0 or more characters.
Here's what I did: set the list as an 11-digit number, use the split method to create an array, and then display the result.
<cfset testList = "12345678901" /> <cfset testArray = testList.split("") /> <cfset request.cfdumpinited = false /> <cfdump label="testArray" expand="true" var="#testArray#"/> <cfabort />
If you run this, you will see that you end up with an array of 12 elements, with the first index element empty. Just delete it with ArrayDelete () or ArrayDeleteAt () and you should be good to go. This should work with all versions of ColdFusion with CFMX 6.
source share