ends_with

Aliases: endswith (deprecated).

ends_with(haystack: string, needle: string) -> bool

Returns true if string str ends with string expr. For backwards compatibility, this function also allows other argument types, and will attempt to coerce them to string, and then checks whether that string ends with the given ending.

Domain

This is a scalar function (calculates a single output value for a single input row).

Categories

Examples

filter ends_with(@.month_name, "ber")

Keep all months that end in "-ber" and discard the others.