---
schema_version: "1"
id: c1881d42174325923a2ae2bb658970ae9f7f291eaeef57e95993a54ec7df2b07
title: endsWith
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.5/dw-core-functions-endswith.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.5/dw-core-functions-endswith
source_site: docs.mulesoft.com
content_type: documentation
content_hash: af984d0971b467946a1bfe3282edba10948b1879d26a606d17e3529a11e5b697
description: MuleSoft Documentation Site
release: "2.5"
latest: false
---
# endsWith

## [](#endswith1)endsWith(text: String, suffix: String): Boolean

文字列が指定されたサブ文字列で終了する場合は ​`true`​、それ以外の場合は ​`false`​ を返します。

### [](#パラメーター)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>text</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">入力文字列 (​<code>String</code>​ (文字列))。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>suffix</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">入力文字列の末尾で検索するサフィックス文字列。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、「Mariano」の末尾にある「no」 (「to」ではない) を検索します。

#### [](#ソース)ソース

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

#### [](#出力)出力

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

## [](#endswith2)endsWith(text: Null, suffix: Any): false

`endsWith`​ を ​`null`​ 値に使用できるようにするヘルパー関数。

_DataWeave バージョン 2.4.0 で導入されました。_