Back to Hugo

strings.RuneCount

docs/content/en/functions/strings/RuneCount.md

0.161.1260 B
Original Source

In contrast with the strings.CountRunes function, which excludes whitespace, strings.RuneCount counts every rune in a string.

go-html-template
{{ "Hello, 世界" | strings.RuneCount }} → 9