See also: listFind |
Determines the index of a given value if the value occurs within a list of delimited values. If no delimiter is specified, the listFindNoCase function splits the string using a comma (',') as the delimiter.
JSV_listFindNoCase(expL, expV [, delimiter])
expL.listFindNoCase(expV [, delimiter])
Returns the index of the first occurrence of a value within a list. Returns 0 if no value is found. The search is not case-sensitive.
The listFindNoCase function uses the following arguments.
Argument | Description |
expL | Delimited list being searched. |
expV | Value being searched for. |
delimiter | Optional. Single delimiter used in string. Default value is a comma. |
n/a
JSV_isEmpty, JSV_toString, JSV_splitString
The following lines of code
var find = "white".toUpperCase();
var testList = "green,red,white,blue";
document.write( "The element " +
find.bold() +
" is found at position " +
JSV_listFindNoCase(testList, find,',') +
" in the list " + testList.bold() );
produce
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.