---
schema_version: "1"
id: f8a73718c97f60b15b852ff451cf0477b3ab39093cfaadb76c891a60d51b4adc
title: unwrap
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.7/dw-strings-functions-unwrap.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.7/dw-strings-functions-unwrap
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8559c26a7cedbc2d4951760a46ec8c3d292bb46bc5d4db18a2d1dbaac872b90a
description: MuleSoft Documentation Site
release: "2.7"
latest: false
---
# unwrap

## [](#unwrap1)unwrap(text: String, wrapper: String): String

指定された ​`text`​ を ​`wrapper`​ テキストからラップ解除します。

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

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

<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">入力文字列。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>wrapper</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ラップ解除するために使用するテキスト。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、さまざまな入力とサイズでの ​`unwrap`​ の動作を示します。

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

```DataWeave
%dw 2.0
import unwrap from dw::core::Strings
output application/json
---
{
  "a": unwrap(null, ""),
  "b": unwrap(null, '\0'),
  "c": unwrap("'abc'", "'"),
  "d": unwrap("AABabcBAA", 'A'),
  "e": unwrap("A", '#'),
  "f": unwrap("#A", '#'),
  "g": unwrap("A#", '#')
}
```

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

```JSON
{
  "a": null,
  "b": null,
  "c": "abc",
  "d": "ABabcBA",
  "e": "A",
  "f": "A#",
  "g": "#A"
}
```

## [](#unwrap2)unwrap(text: Null, wrapper: String): Null

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

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