## ENDS_WITH

The `ENDS_WITH` function in ES|QL is used to check if a keyword string ends with another string. It returns a boolean value indicating the result of this check.

### Syntax

The syntax for using the `ENDS_WITH` function is as follows:

`ENDS_WITH(str, suffix)`

#### Parameters

- `str`: This is a string expression. If null, the function returns null.
- `suffix`: This is a string expression. If null, the function returns null.

### Examples

Here are a couple of examples showing how to use the `ENDS_WITH` function in ES|QL queries:

```esql
FROM employees
| KEEP last_name
| EVAL ln_E = ENDS_WITH(last_name, "d")
```

In this example, the `ENDS_WITH` function is used to check if the `last_name` of employees ends with the letter "d". The result is stored in the `ln_E` field.

```esql
FROM logs-*
| WHERE ENDS_WITH(file_path, ".log")
```

In this second example, the `ENDS_WITH` function is used in a `WHERE` clause to filter out logs that don't have a file path ending with ".log".