ends_with

Description

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.

Return type

bool

Domain

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

Categories

Usage

ends_with(haystack, needle)

Argument

Type

Optional

Repeatable

Restrictions

haystack

string

no

no

none

needle

string

no

no

none

Examples

filter ends_with(@.month_name, "ber")

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

Aliases

endswith (deprecated)