---
schema_version: "1"
id: 6aa3f098e6879ff46f2866351593411dba58b158de71004eea5976421bab91c2
title: endsWith
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dw-core-functions-endswith.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dw-core-functions-endswith
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 81224668287d93e831a823008031ec461ff94542fcde746a3b59f69a7781c3ab
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# endsWith

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## endsWith(String, String): Boolean

Returns `true` if a string ends with a provided substring, `false` if not.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>text</code></p></td><td><p>The input string (a <code>String</code>).</p></td></tr><tr><td><p><code>suffix</code></p></td><td><p>The suffix string to find at the end of the input string.</p></td></tr></tbody></table>

### Example

This example finds "no" (but not "to") at the end of "Mariano".

#### Source

```DataWeave
%dw 2.0
output application/json
---
[ "Mariano" endsWith "no", "Mariano" endsWith "to" ]
```

#### Output

```JSON
[ true, false ]
```
