summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/strings/CountWords.md
blob: e50febf69eb9eda991fa7409e8a2ebaae07efe1b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
---
title: strings.CountWords
description: Returns the number of words in the given string.
categories: []
keywords: []
params:
  functions_and_methods:
    aliases: [countwords]
    returnType: int
    signatures: [strings.CountWords INPUT]
aliases: [/functions/countwords]
---

```go-html-template
{{ "Hugo is a static site generator." | countwords }} → 6
```