--- title: "trim" description: "Takes the argument string and trims of any leading and/or trailing whitespace" --- # trim > Takes the argument string and trims of any leading and/or trailing whitespace **This function is used by Ignition's Expression language.** ## Description Takes the argument string and trims of any leading and/or trailing whitespace, returning the result. ## Syntax `trim(string)` ### Parameters | Type | Parameter | Description | |---|---|---| | String | `string` | The starting string. | ### Results **String** - The starting string with all whitespace removed. ## Examples ```python title="Code Snippet" trim("Hello Dave ") //returns "Hello Dave" ``` ```python title="Code Snippet" trim(" Goodbye.") //returns "Goodbye." ```