---
schema_version: "1"
id: aba1214973222a7b75c50e3fe4d36621db9bbfb7ddaf381964bec0ce9a5d6417
title: fromHex
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.4/dw-numbers-functions-fromhex.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.4/dw-numbers-functions-fromhex
source_site: docs.mulesoft.com
content_type: documentation
content_hash: e0ae7e5d55a85f092e872e2f56cf9069c00866edeeab4dcfeb0341f82ed0b8e2
description: MuleSoft Documentation Site
release: "2.4"
latest: false
---
# fromHex

## [](#fromhex1)fromHex(hexText: String): Number

16 進数を 10 進数に変換します。

_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>hexText</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>String</code>​ で表される 16 進数。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、さまざまな入力での ​`toBinary`​ の動作を示します。

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

```DataWeave
%dw 2.0
import fromHex from dw::core::Numbers
output application/json
---
{
    a: fromHex("-1"),
    b: fromHex("3e3aeb4ae1383562f4b82261d969f7ac94ca4000000000000000"),
    c: fromHex(0),
    d: fromHex(null),
    e: fromHex("f"),
}
```

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

```JSON
{
  "a": -1,
  "b": 100000000000000000000000000000000000000000000000000000000000000,
  "c": 0,
  "d": null,
  "e": 15
}
```

## [](#fromhex2)fromHex(hexText: Null): Null

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

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