Skip to content

kumo.string.trim(STRING)

Since: Version 2024.09.02-c5476b89

The functionality described in this section requires version 2024.09.02-c5476b89 of KumoMTA, or a more recent version.

Returns a string with leading and trailing whitespace removed.

‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space, which includes newlines.

assert(kumo.string.trim '\n Hello\tworld\t\n' == 'Hello\tworld')