Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

remove comma from end of list

ok, I have..

value1,value2,

how would I remove the comma from the end of the list in coldfusion?
0
COwebmaster
Asked:
COwebmaster
  • 2
1 Solution
 
duncancummingCommented:
<cfset newList = Left(oldList, Len(oldList)-1)>
0
 
COwebmasterAuthor Commented:
Thx!
0
 
_agx_Commented:
... BTW, in case you happen to be generating the list yourself you can use list functions to avoid the trailing comma in the first place.

<cfset list = "">
<cfset list = listAppend(list, "value1")>
<cfset list = listAppend(list, "value2")>
...
0
 
COwebmasterAuthor Commented:
Ok, thanks _agx_
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now