ends_with

description

Syntax

BOOLEAN ENDS_WITH (VARCHAR str, VARCHAR suffix)

This function returns true when a string ends with a specified suffix. Otherwise, it returns false. When the argument is NULL, the result is NULL.

example

MySQL > select ends_with("Hello starrocks", "starrocks");
+-----------------------------------+
| ends_with('Hello starrocks', 'starrocks') |
+-----------------------------------+
|                                 1 |
+-----------------------------------+

MySQL > select ends_with("Hello starrocks", "Hello");
+-----------------------------------+
| ends_with('Hello starrocks', 'Hello') |
+-----------------------------------+
|                                 0 |
+-----------------------------------+

keyword

ENDS_WITH