---
schema_version: "1"
id: 902e9bb7e666ab43436d652b8019083d7042f473be7d0b57b5154eb6c5055c41
title: lines (品目)
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.4/dw-strings-functions-lines.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-lines
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 91e1b7ce18b746a0fef81fd8c995b74f721234ce37a12d7e061eed4fe50aa519
description: MuleSoft Documentation Site
release: "2.4"
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 で導入されました。_​