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 a fill_inplace function #226

Merged
merged 1 commit into from
Nov 13, 2020
Merged

Add a fill_inplace function #226

merged 1 commit into from
Nov 13, 2020

Conversation

mgeisler
Copy link
Owner

The fill_inplace function fill the text in-place without reallocation the input string. This is convenient if you already have the input available as a String.

My benchmarks show that this is about twice as fast as the normal fill function.

Fixes #166.

The `fill_inplace` function fill the text in-place without
reallocation the input string. This is convenient if you already have
the input available as a `String`.

My benchmarks show that this is about twice as fast as the normal
`fill` function.

Fixes #166.
@Lokathor
Copy link

Excellent!

@mgeisler mgeisler deleted the fill-inplace branch January 30, 2021 16:48
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.

Request: Ability to have a String wrapped "in place" using &mut String
2 participants