Dave Francis wrote:
> But you still don't know if there is actually an item at position 6.
> ie. 1,2,3,4,5,,7,8,9
Sure there is.
According to Coldfusion, position 6 contains the value of "7" because it
doesn't recognize empty positions.
Personally, I *HATE* that.
<cfset foo = "1,2,3,4,5,,7,8".
<cfset foo = replace(foo,",","xxx,xxx","ALL")>
<cfset bar = listGetAt(foo,6)>
<cfset bar = REReplace(bar,"^xxx(.*?)xxx$","\1","ALL")>
<cfif bar eq "">
The item at position 6 is empty.
<cfelse>
The item at position 6 is not empty.
</cfif>
The regex may be wrong but you get the idea.
Rick
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242491
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54