nanos world API Reference Unofficial documentation
Function Shared

string.Trim

Returns a new string with removed whitespace characters from the front and end of this string

Syntax

Lua
string.Trim()

Returns

  • string

Examples

Removes extra spaces
local str = "  Hello world!    ",local new_str = str:Trim()