Text.EndsWith Function in Power Query

The Text.EndsWith function returns a logical value indicating whether a given text value substring was found at the end of the input string.

Note: If we are not specified any comparer function, then by default the comparison is case sensitive.

Syntax

Text.EndsWith(text as nullable text, substring as text, optional comparer as nullable function) as nullable logical

Example: The comparison is case sensitive.

Power Query M

= Text.Contains("Ashish Goel", "Goel")

The output of the above code is true.

Example: The comparison is case sensitive.

Power Query M

= Text.Contains("Ashish Goel", "goel")

The output of the above code is false.

Example: By using the comparer function Comparer.OrdinalIgnoreCase. The comparison is case sensitive.

Power Query M

= Text.Contains("Ashish Goel", "goel", Comparer.OrdinalIgnoreCase)

The output of the above code is true.