See also: trimL, trimR

Removes all occurences of the trim character from the left and right sides of a character expression.

Syntax

JSV_trimAll(expS [, expC])

Prototype

expS.trimAll([expC])

Returns

The trimAll functions returns the specified expression with the trim character removed from both sides of the string.

Parameters

The trimAll functions use the following arguments.

Argument Description
expS The character to be trimmed.
expC The character to be trimmed. If expC is omitted, spaces are trimmed from the string expS.

Remarks

n/a

Dependencies

JSV_isEmpty, JSV_trimL, JSV_trimR

Example

The following lines of code

var testString = "@@@@@Busy@@@@@@@@@@@@", trimString = '@';
document.write( "Removing " + trimString.bold() + 
    " from " +
    testString.bold() +
    " results in " +
    JSV_trimAll(testString, trimString).bold() );

produce