strings.Count
少于1分钟
将以下英文翻译为中文:
strings.Count
https://gohugo.io/functions/strings.count/
Returns the number of non-overlapping instances of a substring within a string.
语法
strings.Count SUBSTR STRING
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 "" }}` |
另请参阅
最后修改 June 1, 2023: 新增一个配置参数:sidebar_menu_truncate = 500 用于解决菜单不全的问题 (27810f1)