The case-sensitive contains_cs string operator

Learn how to use the contains_cs operator to filter a record set for data containing a case-sensitive string.

Filters a record set for data containing a case-sensitive string. contains_cs searches for arbitrary sub-strings rather than terms.

Performance tips

If you’re looking for a term, use has_cs for faster results.

Syntax

T | where col contains_cs (string)

Parameters

NameTypeRequiredDescription
Tstring✔️The tabular input whose records are to be filtered.
colstring✔️The name of the column to check for string.
stringstring✔️The case-sensitive string by which to filter the data.

Returns

Rows in T for which string is in col.

Example

StormEvents
| summarize event_count=count() by State
| where State contains_cs "AS"

Output

Count
8