mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-18 14:56:50 -05:00
5fd1e74903
``` git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash ``` Closes #11925
737 B
737 B
title | description | categories | keywords | action | aliases | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
strings.Count | Returns the number of non-overlapping instances of the given substring within the given string. |
|
|
If SUBSTR
is an empty string, this function returns 1 plus the number of Unicode code points in STRING
.
{{ "aaabaab" | strings.Count "a" }} → 5
{{ "aaabaab" | strings.Count "aa" }} → 2
{{ "aaabaab" | strings.Count "aaa" }} → 1
{{ "aaabaab" | strings.Count "" }} → 8