hugo/docs/content/en/functions/inflect/Singularize.md
2023-10-20 09:43:56 +02:00

25 lines
606 B
Markdown

---
title: inflect.Singularize
linkTitle: singularize
description: Converts a word according to a set of common English singularization rules.
categories: [functions]
keywords: []
menu:
docs:
parent: functions
function:
aliases: [singularize]
returnType: string
signatures: [inflect.Singularize INPUT]
relatedFunctions:
- inflect.Humanize
- inflect.Pluralize
- inflect.Singularize
aliases: [/functions/singularize]
---
```go-html-template
{{ "cats" | singularize }} → "cat"
```
See also the `.Data.Singular` [taxonomy variable](/variables/taxonomy/) for singularizing taxonomy names.