Skip to content

Commit 1e14d08

Browse files
authoredAug 15, 2024··
Update capabilities.json to include strings.count (#990)
Signed-off-by: Anders Eknert <anders@styra.com>
1 parent e4fcb0f commit 1e14d08

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
 

‎build/capabilities.json

+27
Original file line numberDiff line numberDiff line change
@@ -4983,6 +4983,33 @@
49834983
"type": "function"
49844984
}
49854985
},
4986+
{
4987+
"name": "strings.count",
4988+
"description": "Returns the number of non-overlapping instances of a substring in a string.",
4989+
"categories": [
4990+
"strings"
4991+
],
4992+
"decl": {
4993+
"args": [
4994+
{
4995+
"description": "string to search in",
4996+
"name": "search",
4997+
"type": "string"
4998+
},
4999+
{
5000+
"description": "substring to look for",
5001+
"name": "substring",
5002+
"type": "string"
5003+
}
5004+
],
5005+
"result": {
5006+
"description": "count of occurrences, `0` if not found",
5007+
"name": "output",
5008+
"type": "number"
5009+
},
5010+
"type": "function"
5011+
}
5012+
},
49865013
{
49875014
"name": "strings.render_template",
49885015
"description": "Renders a templated string with given template variables injected. For a given templated string and key/value mapping, values will be injected into the template where they are referenced by key.\n\tFor examples of templating syntax, see https://pkg.go.dev/text/template",

0 commit comments

Comments
 (0)
Please sign in to comment.