Just use the chr(13) and if you get what you want then it is OK. The line breaks are coming from the extra char(10).
Main Topics
Browse All TopicsI'm converting the commas in a list to line breaks (for display in a textarea) this way:
<cfset newlist2 = listChangeDelims(newlist,"
Is it necessary to include chr(10) as well, like this:
<cfset newlist2 = listChangeDelims(newlist,"
When I do that I get double-spaced lines in the textarea, which I'd rather not have.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: JeffHowdenPosted on 2006-04-30 at 20:52:54ID: 16575028
It really depends on the OS of the user viewing the textarea. Just so you know, it's a combination of Chr(13) followed by a Chr(10), not the other way around. Also, ListChangeDelims() does the very same thing as Replace(). Consider the following:
oo,gar'; hangedelim s EQ newlist_replace)#
<cfscript>
newlist = 'foo,bar,boo,far,goo,car,c
newlist_listchangedelims = ListChangeDelims(newlist, Chr(13) & Chr(10));
newlist_replace = Replace(newlist, ',', Chr(13) & Chr(10), 'ALL');
</cfscript>
<cfoutput>
#WriteOutput(newlist_listc
</cfoutput>