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

## [](#startswith1)startsWith(text: String, prefix: 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 ]
```

## [](#startswith2)startsWith(text: Null, prefix: Any): false

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

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