Back to Hugo

strings.CountRunes

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

0.161.1259 B
Original Source

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

go-html-template
{{ "Hello, 世界" | strings.CountRunes }} → 8