strings.RuneCount
Returns the number of runes in the given string.
Syntax
strings.RuneCount STRING
Returns
int
In contrast with the strings.CountRunes function, which excludes whitespace, strings.RuneCount counts every rune in a string.
{{ "Hello, 世界" | strings.RuneCount }} → 9Last updated:
December 19, 2025
:
Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)
Improve this page