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

C#: Fix ExprMatch for case sensitive matching #90678

Merged

Conversation

raulsntos
Copy link
Member

We were accidentally stopping the recursion when matching in the case sensitive scenario.

Took the opportunity to also rename the private method to follow the Core method naming more closely so it's easier to compare the implementations in the future.

Also, the private method now uses ReadOnlySpan<char> to avoid allocating strings on each recursion.

MRP: 90673.zip

We were accidentally stopping the recursion when matching in the case sensitive scenario.

Took the opportunity to also rename the private method to follow the Core method naming more closely so it's easier to compare the implementations in the future.

Also, the private method now uses `ReadOnlySpan<char>` to avoid allocating strings on each recursion.
@raulsntos raulsntos added this to the 4.3 milestone Apr 15, 2024
@raulsntos raulsntos requested a review from a team as a code owner April 15, 2024 01:21
Copy link
Member

@paulloz paulloz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Would be nice to have a test suite for that kind of thing.

@akien-mga akien-mga merged commit 8a3195e into godotengine:master Apr 15, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@raulsntos raulsntos deleted the dotnet/StringExtensions.Match branch April 15, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C#: Incorrect result of StringExtensions.Match
3 participants