summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/inflect/Humanize.md
blob: d3d785243eea5e4bf3ba91403d9bca4ab63adfd0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
title: inflect.Humanize
description: Returns the humanized version of the input with the first letter capitalized.
categories: []
keywords: []
params:
  functions_and_methods:
    aliases: [humanize]
    returnType: string
    signatures: [inflect.Humanize INPUT]
aliases: [/functions/humanize]
---

```go-html-template
{{ humanize "my-first-post" }} → My first post
{{ humanize "myCamelPost" }} → My camel post
```

If the input is an integer or a string representation of an integer, humanize returns the number with the proper ordinal appended.

```go-html-template
{{ humanize "52" }} → 52nd
{{ humanize 103 }} → 103rd
```