---
schema_version: "1"
id: 6f808220a7026f91d5194f56c3090a5fbf87d6c804f077ebf2b180c5d6474c06
title: isNumeric
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.6/dw-strings-functions-isnumeric.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.6/dw-strings-functions-isnumeric
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c7215c297dcd1f278d113c7dc3b18ac285a2d210be4caf8b604ae45c4f58bace
description: MuleSoft Documentation Site
release: "2.6"
latest: false
---
# isNumeric

## [](#isnumeric1)isNumeric(text: String): Boolean

`text`​ に Unicode 数字のみが含まれるかどうかを確認します。

小数点は Unicode 数字ではないため、false が返されます。 このメソッドでは先頭の記号 (プラスまたはマイナス) は許可されません。

_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>
</tbody>
</table>

### [](#例)例

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

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

```DataWeave
%dw 2.0
import isNumeric from dw::core::Strings
output application/json
---
{
  "a": isNumeric(null),
  "b": isNumeric(""),
  "c": isNumeric("  "),
  "d": isNumeric("123"),
  "e": isNumeric("१२३"),
  "f": isNumeric("12 3"),
  "g": isNumeric("ab2c"),
  "h": isNumeric("12-3"),
  "i": isNumeric("12.3"),
  "j": isNumeric("-123"),
  "k": isNumeric("+123")
}
```

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

```JSON
{
  "a": false,
  "b": false,
  "c": false,
  "d": true,
  "e": true,
  "f": false,
  "g": false,
  "h": false,
  "i": false,
  "j": false,
  "k": false
}
```

## [](#isnumeric2)isNumeric(text: Null): Boolean

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

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