Robertson-Ravo, Neil (RX) wrote:

Yep..


<cfset myList = "136033-76421424-106">


<cfdump var="#ListGetAt(myList, 1, "-")#">
<cfdump var="#ListGetAt(myList, 2, "-")#">
<cfdump var="#ListGetAt(myList, 3, "-")#">

Job done..


Just a point about this. Why use listgetat(list, 1, "-") for the first and 3 for the last? imho this is going to be a waste of computer resources (depends on whether it's going to be important but...)


remember that listfirst and listlast don't need to parse a string into a list to find the first and last parts of a list, whereas with listgetat, it MUST parse the entire string into a list BEFORE it can find the correct position in the string.

use listfirst and listlast over listgetat any day! Although, listgetat is more readable in the format you are describing above, but most people can figure out what listfirst and listlast do!

Paul

--
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
     *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
          *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]



Reply via email to