Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Match OPA behavior for split #295

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Conversation

anakrish
Copy link
Collaborator

@anakrish anakrish commented Aug 8, 2024

In case of empty delimiter, Rust's split returns leading and trailing empty strings whereas Golang's doesn't.
Change behavior to match Golang/OPA.

fixes #291

src/builtins/strings.rs Outdated Show resolved Hide resolved
In case of empty delimiter, Rust's split returns leading and trailing
empty strings whereas Golang's doesn't.
Change behavior to match Golang/OPA.

fixes microsoft#291

Signed-off-by: Anand Krishnamoorthi <[email protected]>
@anakrish anakrish merged commit a488a84 into microsoft:main Aug 8, 2024
16 checks passed
@anakrish anakrish deleted the strings.split branch August 8, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strings::split incompatibility for empty delimiters
2 participants