The problem is the # in your string. I'm assuming you are testing
something like this.
<cfset detail = '"#7-Bodi - 25 votes"'>
<cfset votestring = listgetat(detail, 2, "-")>
I'm also assuming that in the real solution you are reading the value
from a file. If this is the case then this will work.
<cffile action="read" file="#ExpandPath('.')#\text.txt"
variable="myOutPut">
<cfset detail = myOutPut>
<cfset votestring = listgetat(detail, 2, "-")>
<cfoutput>
#votestring#
</cfoutput>
Let me know if I'm way off base here with the second assumption.
Chuck
-----Original Message-----
From: Matthew Smith [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 06, 2008 10:55 AM
To: CF-Talk
Subject: using delimiters for a list function
I am trying to access a string as a list to get the second half of it.
Here is the string:
"#7-Bodi - 25 votes"
Here is the code, but it throws an error:
<cfset votestring = listgetat(detail, 2, '-')>
Thanks.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312115
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4