See also: trimL, trimAll

Removes all occurences of the trim character from the right side of a character expression.

Syntax

JSV_trimR(expS [, expC])

Prototype

expS.trimR([expC])

Returns

The trimR functions returns the specified expression with the trim character removed from the right side of the string.

Parameters

The trimR functions use the following arguments.

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

Remarks

n/a

Dependencies

JSV_isEmpty

Example

The following lines of code

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

produce