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 insert & replace methods for runes #225

Merged
merged 4 commits into from
Jan 25, 2025

Conversation

Joy-less
Copy link
Contributor

Adds:

  • Insert(int, char)
  • Insert(int, Rune)
  • Replace(Rune, Rune)
  • Improves Replace(scoped ReadOnlySpan<char>, scoped ReadOnlySpan<char>, int, int)

As I was making this I was left a bit confused by ReplaceGeneric. I wasn't sure why it was called that instead of just Replace. Especially considering Insert has a generic overload that does the same thing just without the ToString fallback.

@linkdotnet
Copy link
Owner

ReplaceGeneric is used to avoid boxing - I'll have a look tomorrow. thx for the pr

@linkdotnet
Copy link
Owner

Maybe also here a CHANGELOG entry might be good on top ;)

@linkdotnet linkdotnet merged commit b68394a into linkdotnet:main Jan 25, 2025
3 checks passed
@Joy-less Joy-less deleted the runes-replace-insert branch January 25, 2025 12:12
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