string.trim
Returns a copy of a string with starting and ending whitespace removed.
Usage
string.trim(my_string)
Arguments
| Name | Type | Description |
|---|---|---|
my_string | string | String to trim. |
Returns
| Name | Type | Description |
|---|---|---|
trimmed | string | Trimmed string. |
Examples
local example = " no superfluous spaces ";
print(example:trim()); -- Prints "no superfluous spaces"