Skip to content

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?

@sonarqubecloud
Copy link

@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