1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00
Files
gohugoio-hugo/docs/content/en/functions/countrunes.md
2018-08-08 13:54:42 +02:00

735 B

title, description, godocref, date, publishdate, lastmod, categories, menu, keywords, signature, workson, hugoversion, relatedfuncs, deprecated
title description godocref date publishdate lastmod categories menu keywords signature workson hugoversion relatedfuncs deprecated
countrunes Determines the number of runes in a string excluding any whitespace. 2017-02-01 2017-02-01 2017-02-01
functions
docs
parent
functions
counting
word count
countrunes INPUT
false

In contrast with countwords function, which counts every word in a string, the countrunes function determines the number of runes in the content and excludes any whitespace. This has specific utility if you are dealing with CJK-like languages.

{{ "Hello, 世界" | countrunes }}
<!-- outputs a content length of 8 runes. -->