From 1e14d08e5d68e6901aa3ffe41a19ff4c89b046dd Mon Sep 17 00:00:00 2001 From: Anders Eknert Date: Thu, 15 Aug 2024 15:05:58 +0200 Subject: [PATCH] Update capabilities.json to include `strings.count` (#990) Signed-off-by: Anders Eknert --- build/capabilities.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/build/capabilities.json b/build/capabilities.json index 7cd4c199..c65032f4 100644 --- a/build/capabilities.json +++ b/build/capabilities.json @@ -4983,6 +4983,33 @@ "type": "function" } }, + { + "name": "strings.count", + "description": "Returns the number of non-overlapping instances of a substring in a string.", + "categories": [ + "strings" + ], + "decl": { + "args": [ + { + "description": "string to search in", + "name": "search", + "type": "string" + }, + { + "description": "substring to look for", + "name": "substring", + "type": "string" + } + ], + "result": { + "description": "count of occurrences, `0` if not found", + "name": "output", + "type": "number" + }, + "type": "function" + } + }, { "name": "strings.render_template", "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",