opa icon indicating copy to clipboard operation
opa copied to clipboard

Implement strings.count built-in function

Open Manish-Giri opened this issue 1 year ago • 1 comments

Fixes #6827

Why the changes in this PR are needed?

These changes would be an enhancement over first having to generate the indices, then again a count of the indices.

What are the changes in this PR?

Adding support for a strings.Count built-in function, that would return the count of occurrences directly. Includes tests.

Manish-Giri avatar Jun 29 '24 07:06 Manish-Giri

Deploy Preview for openpolicyagent ready!

Name Link
Latest commit c50066d92b2dcecf6aff918af20e98b2f16f82c1
Latest deploy log https://app.netlify.com/sites/openpolicyagent/deploys/66838e661dcdfd0008df3301
Deploy Preview https://deploy-preview-6836--openpolicyagent.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jun 29 '24 07:06 netlify[bot]

@srenatus I actually ran into this weird problem of having additional, erroneous commits during 2 rebase attempts, in order to fix the failing DCO check. Not sure what happened in the first attempt that caused these additional commits.

It was easier to create another PR #6841 again. Please review!

This PR can then be closed if the newer one is ready for merge.

Manish-Giri avatar Jul 03 '24 06:07 Manish-Giri

Closing in favor of https://github.com/open-policy-agent/opa/pull/6841.

ashutosh-narkar avatar Jul 03 '24 18:07 ashutosh-narkar