Atom

text.trim()

Removes leading and trailing Unicode whitespace.

Signature

text.trim(value)

Parameters

Text.

Returns

String.

Behavior

Interior whitespace is preserved.

Errors

Invalid argument type.

Example

Atom
use text
assert(text.trim('  café\n') == 'café')