---
schema_version: "1"
id: 8aa98963616ac07fcd70d1971888bfd16171aff97c931a54a4f71f46a5e0ca52
title: lines (品目)
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.6/dw-strings-functions-lines.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.6/dw-strings-functions-lines
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 4c7c94bd746fea233c80db2ef35a8ae0125a59a73d503c33fcb64674dea822d3
description: MuleSoft Documentation Site
release: "2.6"
latest: false
---
# lines (品目)

## [](#lines1)lines(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>

### [](#例)例

次の例では、文字列を行に分割しています。 `\n`​ は改行を表します。

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

```DataWeave
%dw 2.0
import lines from dw::core::Strings
output application/json
---
lines("hello world\n\nhere   data-weave")
```

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

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

## [](#lines2)lines(text: Null): Null

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

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