> For the complete documentation index, see [llms.txt](https://sevenval.gitbook.io/flat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sevenval.gitbook.io/flat/reference/functions/ends-with.md).

# ends-with()

```
boolean ends-with(string haystack, string needle)
```

The function `ends-with` returns `true` if the first argument string ends with the second argument string, and otherwise returns `false`.

## Examples

* `ends-with("foo", "oo")` returns `true`
* `ends-with($request/url, ".json")` could be used to identify JSON resources
