OpenBI Docs Buy

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
ParameterTypeDescription
textnullable textThe 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.Replace a 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!"

Text.Trim, Text.Replace, Text.Remove.

Last updated · OpenBI Studio 0.3.79