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 TrimPrefix and TrimSuffix #226

Merged
merged 3 commits into from
Jan 23, 2025

Conversation

Joy-less
Copy link
Contributor

@Joy-less Joy-less commented Jan 23, 2025

Adds:

  • TrimPrefix(ReadOnlySpan<char>, StringComparison)
  • TrimSuffix(ReadOnlySpan<char>, StringComparison)
  • Relevant unit tests

These are basically the same as TrimStart and TrimEnd but they remove a single string instead of every occurrence of a character.

@linkdotnet
Copy link
Owner

LGTM - good work. Could you add a note in the CHANGELOG.md giving credit to yourself?

@Joy-less
Copy link
Contributor Author

LGTM - good work. Could you add a note in the CHANGELOG.md giving credit to yourself?

Done 😊

### Added

- Added `TrimPrefix(ReadOnlySpan<char>, StringComparison)` (by yours truly (@Joy-less) in #226)
- Added `TrimSuffix(ReadOnlySpan<char>, StringComparison)` (also by yours truly (@Joy-less) in #226)
Copy link
Owner

Choose a reason for hiding this comment

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

lol :D

@linkdotnet linkdotnet merged commit a02c43d into linkdotnet:main Jan 23, 2025
3 checks passed
@Joy-less Joy-less deleted the add-trim-prefix-and-trim-suffix branch January 23, 2025 22:18
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