OpenBI Docs Buy

Text.TrimStart

A text without the white space, or other characters you name, at its start.

Group: Text and characters. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Text.TrimStart(text as nullable text, optional trim as any) as nullable text
ParameterTypeDescription
textnullable textThe text to work on; null gives null.
trimany
optional
The characters to take away: one character as text, or a list of such. Left out, white space (spaces, tabs, line breaks).

Returns

nullable text. The text with the characters taken off its start; the end stays as it was.

Examples

Leading zeros of an article number

Text.TrimStart("000042", "0")
"42"

Only the start

Text.TrimStart("  Oslo  ")
"Oslo  "

The spaces at the end stay.

Text.Trim, Text.TrimEnd, Text.PadStart.

Last updated · OpenBI Studio 0.3.79