String-ends-with operator

Syntax

…string-expr… ENDS WITH …string-expr…

Typing

STRING, STRING -> BOOL

Description

Test if a string ends with a given substring.

Unlike the LIKE operator, does not require any of its operands to be a literal string value.

Examples

expression evaluates to
"foobar" ENDS WITH "bar" TRUE
"foo"||"bar" STARTS WITH 2*"x" FALSE

See Also

Find the first or last occurrence of a character Comparing strings with patterns String-starts-with operator