---
schema_version: "1"
id: 64f61289c540f29d6649d980ebbb9f612b16caede7fb1f75859ee70fdfbd3016
title: repeat
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.3/dw-strings-functions-repeat.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.3/dw-strings-functions-repeat
source_site: docs.mulesoft.com
content_type: documentation
content_hash: fc613f843be8a4d4533241ab6657b03b43d6c6cb5fdd7b432c2650c630e7d1fa
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# repeat

## [](#repeat1)repeat(String, Number): String

`text`​ を、指定された回数 (​`times`​) 繰り返します。

_DataWeave 2.2.0 で導入されました。Mule 4.2 以降でサポートされます。_​

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

<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>times</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">文字を繰り返す回数。負の値はゼロとして処理されます。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

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

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

```DataWeave
%dw 2.0
import * from dw::core::Strings
output application/json
---
{
  "a": repeat("e", 0),
  "b": repeat("e", 3),
  "c": repeat("e", -2)
}
```

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

```JSON
{
  "a": "",
  "b": "eee",
  "c": ""
}
```