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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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?

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.

1 participant