strings.CountWords
Returns the number of words in the given string.
Syntax
strings.CountWords INPUT
Returns
int
Alias
countwords
{{ "Hugo is a static site generator." | countwords }} → 6
Last updated:
March 5, 2025
:
content: Remove "related" array from function and method pages (2fcd21ee5)
Improve this page