coldfusion - Change the List delimiter to something new -


i trying change delimiters of list. far have been successful, losing ground on 1 of actions.

the issue last element, v. code never appends ="" last element. should not add comma it.

code:

<cfset foo="t,u,n,f,o,a,c,r,v"> <cfset msg = listchangedelims(foo,'="",')> <cfoutput>#msg#</cfoutput> 

result:

t="",u="",n="",f="",o="",a="",c="",r="",v  

i hope question makes sense.

that definition of delimiter. anyway, relatively easy fix, add last 1 yourself.

<cfset foo="t,u,n,f,o,a,c,r,v"> <cfset msg = listchangedelims(foo,'="",')> <cfset msg &= '=""'> <cfoutput>#msg#</cfoutput> 

http://trycf.com/gist/4ac3702b74bd79b5d1f8/


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -