---
schema_version: "1"
id: 8dbf00b2d4067e494074e0a9541b3d8b0e698f9288a2b2da2a7a92d063267cc4
title: words
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.4/dw-strings-functions-words.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-words
source_site: docs.mulesoft.com
content_type: documentation
content_hash: cfd2c8142b7fc9830b6094d6b739fae9cf32e3c4d04767d51f528a312d8c46e3
description: MuleSoft Documentation Site
release: "2.4"
latest: false
---
# words

## [](#words1)words(text: String): Array<String>

文字列からの単語の配列を返します。

単語間の区切り文字には空白スペース、改行、タブなどがあります。

_DataWeave バージョン 2.4.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>

### [](#例)例

次の例では、文字列を含まれている ​`words`​ 別に分割しています。 `\n`​ は改行を表し、​`\t`​ はタブを表します。

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

```DataWeave
%dw 2.0
import words from dw::core::Strings
output application/json
---
words("hello world\nhere\t\t\tdata-weave")
```

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

```Json
["hello", "world", "here", "data-weave"]
```

## [](#words2)words(text: Null): Null

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

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