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.

Syntax

JSV_listFindNoCase(expL, expV [, delimiter])

Prototype

expL.listFindNoCase(expV [, delimiter])

Returns

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.

Parameters

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.

Remarks

n/a

Dependencies

JSV_isEmpty, JSV_toString, JSV_splitString

Example

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