---
schema_version: "1"
id: d22b29e4d011b28c8cdadf8a31aae992a6f08843779753f021b343e5d2d7f158
title: startsWith
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.3/dw-core-functions-startswith.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.3/dw-core-functions-startswith
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 1ac1f50d23cdb4055c211e6b74188a5054602611a0951d80789708524efd129c
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# startsWith

## [](#startswith1)startsWith(String, String): Boolean

入力文字列が照合するプレフィックスで始まるかどうかによって ​`true`​ または ​`false`​ を返します。

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

<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>prefix</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">プレフィックスを識別する文字列。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、文字列が指定したプレフィックスで始まるかどうかを示します。 `startsWith(text,prefix)`​ または ​`text startsWith(prefix)`​ 表記 (​`startsWith("Mari","Mar")`​、​`"Mari" startsWith("Mar")`​ など) を使用できます。

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

```DataWeave
%dw 2.0
output application/json
---
[ "Mari" startsWith("Mar"), "Mari" startsWith("Em") ]
```

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

```JSON
[ true, false ]
```