The case-insensitive endswith string operator

Learn how to use the endswith operator to filter a record set for data with a case-insensitive string.

Filters a record set for data with a case-insensitive ending string.

Performance tips

For faster results, use the case-sensitive version of an operator. For example, use endswith_cs instead of endswith.

Syntax

T | where col endswith (expression)

Parameters

NameTypeRequiredDescription
Tstring✔️The tabular input whose records are to be filtered.
colstring✔️The column to filter.
expressionstring✔️The expression used to filter.

Returns

Returns the rows in T for which the predicate is true.

Examples

The following example returns the rows in the StormEvents table where the State column ends with “SAS”.

StormEvents
| summarize Events=count() by State
| where State endswith "sas"
| where Events > 10
| project State, Events

Output

StateEvents
KANSAS3166
ARKANSAS1028