--- title: "normalize-space()" slug: "string-trim" updated: 2026-08-17T07:52:57Z published: 2026-08-17T07:52:57Z canonical: "docs.lobstersoftware.com/string-trim" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # normalize-space() This function removes all leading and trailing non-printable characters and spaces (whitespaces) from text **a*.*** ## Parameters | Parameter | Description | | --- | --- | | a | Text | ## Examples Spaces and other whitespaces are represented as underscores for better readability. | Parameter a | Result | | --- | --- | | | | | text | text | | __text__ | text | | __sample_text__ | sample_text |