Solved

remove comma from end of list

Posted on 2009-03-30
4
365 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Asp.net plan security, reliable, stable 2 110
wordpress email form 23 72
Problem to get function 52 100
site launch date and last modified date 3 80
This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

919 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

19 Experts available now in Live!

Get 1:1 Help Now