Caplin Trader 5.1.0

Class: module:ct-element/formatter/TrimFormatter

module:ct-element/formatter/TrimFormatter()

new module:ct-element/formatter/TrimFormatter()

Trims whitespace from both ends of the string.

Implements:

Methods

format(value) → {String}

Trims whitespace from both ends of the string.

TrimFormatter is typically used in the XML Renderer Framework, but can be invoked programmatically as in the following example which evaluates to "Buy USD":

TrimFormatter.format(" Buy USD ")
Parameters:
Name Type Description
value String

the string to trim.

Implements:
Returns:

the trimmed string.

Type
String