Debian Codegraph @

docs/content/en/functions/inflect/Humanize.md

raw
1 ---
2 title: inflect.Humanize
3 description: Returns the humanized version of the input with the first letter capitalized.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 aliases: [humanize]
9 returnType: string
10 signatures: [inflect.Humanize INPUT]
11 aliases: [/functions/humanize]
12 ---
13
14 ```go-html-template
15 {{ humanize "my-first-post" }} → My first post
16 {{ humanize "myCamelPost" }} → My camel post
17 ```
18
19 If the input is an integer or a string representation of an integer, humanize returns the number with the proper ordinal appended.
20
21 ```go-html-template
22 {{ humanize "52" }} → 52nd
23 {{ humanize 103 }} → 103rd
24 ```