hugo/docs/content/en/functions/strings/CountRunes.md
2023-10-20 09:43:56 +02:00

702 B

title linkTitle description categories keywords menu function relatedFunctions aliases
strings.CountRunes countrunes Returns the number of runes in a string excluding whitespace.
functions
docs
parent
functions
aliases returnType signatures
countrunes
int
strings.CountRunes INPUT
len
strings.Count
strings.CountRunes
strings.CountWords
strings.RuneCount
/functions/countrunes

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

{{ "Hello, 世界" | strings.CountRunes }} → 8