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

Clean-up code by introducing String compare helpers #288

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

Corniel
Copy link
Contributor

@Corniel Corniel commented Sep 8, 2024

To improve on the readability when comparing strings case insensitive, I've created 3 extension methods:

namespace System;

internal static class BuildalyzerStringExtensions
{
    public static bool IsMatch(this string? self, string? value);
    public static bool IsMatchStart(this string self, string value);
    public static bool IsMatchEnd(this string self, string value);
}

For obvious reasons this helpers are kept internal, as this should not be a deliverable of Buildalyzer.

@Corniel
Copy link
Contributor Author

Corniel commented Nov 1, 2024

@phmonte Can we agree on the usefulness of this?

@phmonte phmonte merged commit 8f1096b into phmonte:main Nov 12, 2024
6 checks passed
@Corniel Corniel deleted the string-is-match branch November 13, 2024 06:44
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.

2 participants