Text.Clean
A text without its control characters: line breaks, tabs and the other invisible codes below a space.
Group: Text and characters. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Text.Clean(text as nullable text) as nullable text
| Parameter | Type | Description |
|---|---|---|
text | nullable text | The text to clean; null gives null. |
Returns
nullable text. The text with every control character taken out.
Remarks
- Spaces stay. Line breaks go without a space in their place, so words on two lines can run together:
Text.Replacea line break with a space first when that matters.
Examples
A note pasted from another system
Text.Clean("Line one#(lf)Line two#(tab)!")
"Line oneLine two!"