strings.CountWords
Returns the number of words in the given string.
Syntax
strings.CountWords STRING
Returns
int
Alias
countwords
{{ "Hugo is a static site generator." | countwords }} → 6Hugo Documentation

Syntax
Returns
Alias
{{ "Hugo is a static site generator." | countwords }} → 6