--- 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 - 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." ```