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

Add RemoveSeparators method to process strings without separators #87

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

shinji-san
Copy link
Owner

This pull request introduces a new method RemoveSeparators to the codebase, updates the documentation to reflect this addition, and includes tests to ensure the new method works correctly. The most important changes are summarized below:

New Method Addition:

  • Added RemoveSeparators method to remove all separators from a string, useful for processing credit card numbers. [1] [2]

Documentation Updates:

  • Updated README.md to use the new RemoveSeparators method in examples for handling credit card numbers. [1] [2]

Testing Enhancements:

  • Added tests for the RemoveSeparators method to ensure it correctly processes input strings by removing various separators.

Codebase Maintenance:

  • Included System.Text.RegularExpressions conditionally based on the target framework version in src/Luhn.cs.

The new `RemoveSeparators` extension method removes various separators from a string, such as spaces, dashes, and slashes.
This is particularly useful for handling formatted inputs like credit card numbers.
Updated relevant tests, documentation, and examples to reflect this addition.

Resolves: No entry
@shinji-san shinji-san self-assigned this Jan 2, 2025
@shinji-san shinji-san merged commit 250348a into develop Jan 2, 2025
3 checks passed
@shinji-san shinji-san deleted the feature-RemoveSeparators branch January 2, 2025 18:17
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