Solved

remove comma from end of list

Posted on 2009-03-30
4
363 Views
Last Modified: 2013-12-24
ok, I have..

value1,value2,

how would I remove the comma from the end of the list in coldfusion?
0
Comment
Question by:COwebmaster
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
duncancumming earned 500 total points
Comment Utility
<cfset newList = Left(oldList, Len(oldList)-1)>
0
 

Author Closing Comment

by:COwebmaster
Comment Utility
Thx!
0
 
LVL 52

Expert Comment

by:_agx_
Comment Utility
... 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
 

Author Comment

by:COwebmaster
Comment Utility
Ok, thanks _agx_
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now