string.trim

From Minetest Developer Wiki
Jump to navigation Jump to search

Syntax

<source> string.trim(str) </source>

Description

Removes whitespace from the beginning and end of the given string.

Example 1

<source> string.trim("\n \t\tfoo bar\t ") == "foo bar" </source>