Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

remove comma from end of list

Posted on 2009-03-30
4
Medium Priority
?
374 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 2000 total points
ID: 24022917
<cfset newList = Left(oldList, Len(oldList)-1)>
0
 

Author Closing Comment

by:COwebmaster
ID: 31564532
Thx!
0
 
LVL 52

Expert Comment

by:_agx_
ID: 24029163
... 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
ID: 24033459
Ok, thanks _agx_
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

885 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