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

## [](#singularize1)singularize(String): String

複数形の文字列を単数形に変換します。

入力がすでに単数形 (「box」など) の場合、出力は入力と一致します。

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

<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>

### [](#例)例

次の例では、入力文字列「boxes」を変換して「box」を返します。

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

```DataWeave
%dw 2.0
import * from dw::core::Strings
output application/json
---
{ "singularize" : singularize("boxes") }
```

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

```JSON
{ "singularize" : "box" }
```

## [](#singularize2)singularize(Null): Null

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