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 StringSegmentList.Replace(char[] characters, char replacement) #224

Open
candoumbe opened this issue Nov 27, 2024 · 0 comments
Open
Assignees
Labels
area: strings Related to the Strings package enhancement New feature or request

Comments

@candoumbe
Copy link
Owner

Is your feature request related to a problem? Please describe.
From time to time, we must replace multitple characters in a string

Describe the solution you'd like
Given the following string "Hello World"
It would be nice to be able to replace both e and o.

Describe alternatives you've considered
Calling Replace(char, char) twice successively

StringSegmentLinkedList segmentList = new ("Hello", "World");

stringSegmentList  = segmentList.Replace('e', 'a').Replace('o', 'e')
 

But with the current implementation this will be very inefficient as the algorithm loops through all nodes of the segmentList for each call to .Replace(char, char) method.

Additional context
Add any other context or screenshots about the feature request here.

@candoumbe candoumbe added enhancement New feature or request area: strings Related to the Strings package labels Nov 27, 2024
@candoumbe candoumbe self-assigned this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: strings Related to the Strings package enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant