Skip to main content

Trim both ends (string.trim)

Declaration

out = string.trim(text)

Parameters

  • text
    string. Text to trim.

Returns

  • out
    string. The text with leading and trailing whitespace removed.

Description

Remove whitespace on both ends.
Whitespace includes "\r" "\n" "\t".

Example

At the end of this chapter