Bharat Patel Feb,08 2017
In out day to day programming we use list. Sometimes we are getting list with some null element and dangle delimiter so we are applying code for removing null element. Today I have done simple and easy solution for that. I hope it will be helpful for you.
<cfset List1 = 'bharat,akash,,pritesh,,nirav,6,,7,'><b>List1</b> : <cfoutput>#List1#</cfoutput><br /><cfset List2 = ArrayToList(ListToArray(List1,','))><b>List2</b> : <cfoutput>#List2#</cfoutput>
List1 : bharat,akash,,pritesh,,nirav,6,,7,List2 : bharat,akash,pritesh,nirav,6,7