Deletes an expression from a list with the passed delimiter. If no delimiter is specified, the the expression is deleted using a comma (',') as the delimiter.

Syntax

JSV_listDelete(expL, expE [, delimiter] [, caseSensitive])

Prototype

expL.listDelete(expE [, delimiter] [, caseSensitive])

Returns

Returns the original list with the expression deleted.

Parameters

The listDelete function uses the following arguments.

Argument Description
expL Delimited list.
expE The expression to be appended.
delimiter Optional. Single delimiter used in string. Default value is a comma.
caseSensitive Optional. Boolean value that determines if the attribute name comparison is case sensitive. Default value is false.

Remarks

n/a

Dependencies

JSV_isWhitespace, JSV_listLen

Example

The following lines of code

var myList= "1,2,3,4,5,6,7";
var myDelete = "4";
document.write( "List: " + myList +
    "<BR>List with 4 deleted: " + 
    JSV_listDelete(myList,myDelete) );

produce