diff options
Diffstat (limited to 'content/en/functions/inflect/Humanize.md')
-rw-r--r-- | content/en/functions/inflect/Humanize.md | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/content/en/functions/inflect/Humanize.md b/content/en/functions/inflect/Humanize.md index 74d24f310..41d61a4e5 100644 --- a/content/en/functions/inflect/Humanize.md +++ b/content/en/functions/inflect/Humanize.md @@ -1,29 +1,26 @@ --- title: inflect.Humanize -linkTitle: humanize -description: Returns the humanized version of an argument with the first letter capitalized. -categories: [functions] +description: Returns the humanized version of the input with the first letter capitalized. +categories: [] keywords: [] -menu: - docs: - parent: functions -function: +action: aliases: [humanize] + related: + - functions/inflect/Pluralize + - functions/inflect/Singularize returnType: string signatures: [inflect.Humanize INPUT] -relatedFunctions: - - inflect.Humanize - - inflect.Pluralize - - inflect.Singularize aliases: [/functions/humanize] --- -If the input is either an int64 value or the string representation of an integer, humanize returns the number with the proper ordinal appended. +```go-html-template +{{ humanize "my-first-post" }} → My first post +{{ humanize "myCamelPost" }} → My camel post +``` +If the input is either an int64 value or the string representation of an integer, humanize returns the number with the proper ordinal appended. ```go-html-template -{{ humanize "my-first-post" }} → "My first post" -{{ humanize "myCamelPost" }} → "My camel post" -{{ humanize "52" }} → "52nd" -{{ humanize 103 }} → "103rd" +{{ humanize "52" }} → 52nd +{{ humanize 103 }} → 103rd ``` |