Normalize spaces
Turn runs of spaces, tabs and no-break spaces into one space and trim the ends, keeping or joining the lines, e.g. for text read from web pages or PDFs.
Command in the String toolkit · id ooa.string/normalize_spaces · 2 inputs (1 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Text | String | Yes | Text to tidy. | |
| Keep line breaks | Boolean | No | false | Keep the lines (tidying each, and dropping empty ones); when off, everything becomes one line. |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | String | The tidied text. |