mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
700 B
700 B
title | description | categories | menu | keywords | signature | relatedfuncs | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
strings.RuneCount | Determines the number of runes in a string. |
|
|
|
|
|
In contrast with strings.CountRunes
function, which strips HTML and whitespace before counting runes, strings.RuneCount
simply counts all the runes in a string. It relies on the Go [utf8.RuneCountInString
] function.
{{ "Hello, 世界" | strings.RuneCount }}
<!-- outputs a content length of 9 runes. -->