hugo

Fork of github.com/gohugoio/hugo with reverse pagination support

git clone git://git.shimmy1996.com/hugo.git

countrunes.md (725B)

    1 ---
    2 title: countrunes
    3 description: Determines the number of runes in a string excluding any whitespace.
    4 date: 2017-02-01
    5 publishdate: 2017-02-01
    6 lastmod: 2017-02-01
    7 categories: [functions]
    8 menu:
    9   docs:
   10     parent: "functions"
   11 keywords: [counting, word count]
   12 signature: ["countrunes INPUT"]
   13 workson: []
   14 hugoversion:
   15 relatedfuncs: []
   16 deprecated: false
   17 ---
   18 
   19 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.
   20 
   21 ```
   22 {{ "Hello, δΈ–η•Œ" | countrunes }}
   23 <!-- outputs a content length of 8 runes. -->
   24 ```
   25 
   26 [pagevars]: /variables/page/