Thanks. I'm not sure if your method is quicker, but it allows me to break my
list wherever I need to.
cfset thelist =aa,bb,cc,dd,ee,ff,uu,vv,ww,xx,yy,zz
What would be the most efficient way to split the list into two lists,
Try this :
cfset thelist =aa,bb,cc,dd,ee,ff,uu,vv,ww,xx,yy,zz
CFSET
cfset thelist =aa,bb,cc,dd,ee,ff,uu,vv,ww,xx,yy,zz
What would be the most efficient way to split the list into two lists,
Try this :
cfset thelist =aa,bb,cc,dd,ee,ff,uu,vv,ww,xx,yy,zz
CFSET st = REFind (([^\,]*\,){6}, thelist, 1, true)
CFSET list1 = mid(theList, 1, st.len[1]-1)
CFSET list2 =
I've been looking for this for long now.
What happens when you have a list containing coma-delimited numbers, say
1,2,3,4,X
Where X is a number below 5000.
How do you split this list into equal lengths of 100?
~|
Want to
Totally untested and written on my phone, but it should be close:
A = listToArray(yourList);
Parts = [];
while (arrayLen(a) gt 100) {
ArrayAppend(parts, a.subList(0, 100));
A = a.subList(100, arrayLen(a));
}
Dump(parts);
Cheers,
Barneyb
--
Barney Boisvert
bboisv...@gmail.com
How do you split this list into equal lengths of 100?
1. make a function to split the list into the first 100 elements and the
rest.
2. loop on the rest until its length is = 100
~|
Want to reach the ColdFusion community with
5 matches
Mail list logo