Solved

remove comma from end of list

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

810 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