---
schema_version: "1"
id: 06d9d88c7df2182935f2c6ddae5b1464d3fd4f90927c05f8e78aab7a8018b089
title: substringEvery
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.5/dw-strings-functions-substringevery.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.5/dw-strings-functions-substringevery
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c732ba11a28852acd416731c1a47110ce9c904a50356bd2929708b91048aaa51
description: MuleSoft Documentation Site
release: "2.5"
latest: false
---
# substringEvery

## [](#substringevery1)substringEvery(text: String, amount: Number): 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>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>amount</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">各サブ文字列の目的の長さ。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、入力文字列を分割するときの ​`substringEvery`​ の動作を示します。最後に返された文字列は他の文字列よりも短くなっています。

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

```DataWeave
%dw 2.0
import substringEvery from dw::core::Strings
output application/json
---
substringEvery("substringEvery", 3)
```

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

```Json
["sub", "str", "ing", "Eve", "ry"]
```

## [](#substringevery2)substringEvery(text: Null, amount: Any): Null

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

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