Re: What is the easiest way to get the true length of a list.

2006-08-22 Thread Robertson-Ravo, Neil (RX)
You will no doubt have to do some work on the empty values first - I cannot remember but what happens when you do an #ArrayLen(ListToArray(yourlist))#? This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant, Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed

Re: What is the easiest way to get the true length of a list.

2006-08-22 Thread Barney Boisvert
len(REreplace(myList, [^,]+, , all) + 1 should work. Just removing (or replacing with nothing) all the non-delimiter characters, and then counting the delimiters, and adding one for the fencepost problem. cheers, barneyb On 8/22/06, Ian Skinner [EMAIL PROTECTED] wrote: Counting all the

RE: What is the easiest way to get the true length of a list.

2006-08-22 Thread Jeff Garza
http://www.cflib.org/udf.cfm?id=961 -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 22, 2006 9:17 AM To: CF-Talk Subject: What is the easiest way to get the true length of a list. Counting all the elements, including the empty ones? Do I need to

Re: What is the easiest way to get the true length of a list.

2006-08-22 Thread Robertson-Ravo, Neil (RX)
I think there is even a handy UDF on cflib.. This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant, Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be

RE: What is the easiest way to get the true length of a list.

2006-08-22 Thread Ben Nadel
Young Jedi, Be careful with the Java split method... In your example, the length is indeed 4... However, this: cfset lst = jedi,homer,,, / #ArrayLen(lst.split(,))# Only has TWO array elements. It seems to only count list items until no more valid items are found. This seems to be confirmed at

Re: What is the easiest way to get the true length of a list.

2006-08-22 Thread Claude Schneegans
Do I need to modify the list to put some throwaway character to get all the elements counted I'm affraid so, however, and especially if your list is large, it could be more efficient to replace all commas with nothing and compare the length of the resulting string. This way, no list function