Gopher
FUNCTIONS

strings.Count

Returns the number of non-overlapping instances of a substring within a string.

Syntax

strings.Count SUBSTR STRING
New in v0.74.0

If SUBSTR is an empty string, this function returns 1 plus the number of Unicode code points in STRING.

Example Result
`{{ “aaabaab” strings.Count “a” }}`
`{{ “aaabaab” strings.Count “aa” }}`
`{{ “aaabaab” strings.Count “aaa” }}`
`{{ “aaabaab” strings.Count "" }}`