Coast Line
asked on
need to find item from list
Hi, I need to find 69 from 65 - 72 how can i do, i tried listfind, listcontains, none working
ASKER
i used this function
function listFindMissing(list) {
var delim="-"; // list delimiter
var arrToSearch="";
var i=0;
var j=0;
var returnList="";
if(arrayLen(arguments) GTE 2) delim = arguments[2];
arrToSearch=listToArray(li st,delim);
for(i=ArrayMin(arrToSearch );i LTE arrayMax(arrToSearch);i=i+ 1)
for(j=1;j LTE arrayLen(arrToSearch);j=j+ 1)
if(arrToSearch[j] EQ i) break;
else
if (j EQ arrayLen(arrToSearch))
returnList = listAppend(returnList,i,de lim);
return returnList;
}
but it is skipping the first and the last letter say
the values are 65-72
it shows me 66,67,68,69,70,71
i need the start and the end too of this
function listFindMissing(list) {
var delim="-"; // list delimiter
var arrToSearch="";
var i=0;
var j=0;
var returnList="";
if(arrayLen(arguments) GTE 2) delim = arguments[2];
arrToSearch=listToArray(li
for(i=ArrayMin(arrToSearch
for(j=1;j LTE arrayLen(arrToSearch);j=j+
if(arrToSearch[j] EQ i) break;
else
if (j EQ arrayLen(arrToSearch))
returnList = listAppend(returnList,i,de
return returnList;
}
but it is skipping the first and the last letter say
the values are 65-72
it shows me 66,67,68,69,70,71
i need the start and the end too of this
ASKER
i am on cf 10
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
65,66,67,68,69,70,71,72 ??
and you want to check if 69 is in it?
What version of CF are you using?
Bit more information would be helpful
Tom