new module:ct-element /formatter /Trim Formatter()
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