trimRight

Non-standard

Summary

Removes whitespace from the right end of the string.

Method of String
Implemented in JavaScript 1.8.1
ECMAScript Edition None

Syntax

string.trimRight()

Parameters

None.

Description

The trimRight method returns the string stripped of whitespace from its right end. trimRight does not affect the value of the string itself.

Examples

Example: Using trimRight

The following example displays the lowercase string "   foo":

var orig="   foo  "
document.write(orig.trimRight())

See Also

Tags (1)

Edit tags

Attachments (0)

 

Attach file