Share via


Text.EndsWith

Syntax

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

About

Indicates whether the given text, text, ends with the specified value, substring. The indication is case sensitive.

comparer is a Comparer which is used to control the comparison. Comparers can be used to provide case-insensitive or culture and locale-aware comparisons.

The following built-in comparers are available in the formula language:

Example 1

Check if "Hello, World" ends with "world".

Usage

Text.EndsWith("Hello, World", "world")

Output

false

Example 2

Check if "Hello, World" ends with "World".

Usage

Text.EndsWith("Hello, World", "World")

Output

true