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

proposal: x/text: add replace package #40338

Open
icholy opened this issue Jul 22, 2020 · 1 comment
Open

proposal: x/text: add replace package #40338

icholy opened this issue Jul 22, 2020 · 1 comment
Labels
Milestone

Comments

@icholy
Copy link

@icholy icholy commented Jul 22, 2020

The bytes, strings, and regexp packages provide functions for replacing text in strings and byte slices. These only operate on strings and byte slices that are in memory. I propose a new golang.org/x/text/replace package which implements golang.org/x/text/transform.Transformer's for replacing text. These would enable doing text replacements on io.Readers.

prototype: https://github.com/icholy/replace

@gopherbot gopherbot added this to the Proposal milestone Jul 22, 2020
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jul 22, 2020

CC @mpvl

@ianlancetaylor ianlancetaylor added this to Incoming in Proposals Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Proposals
Incoming
Development

No branches or pull requests

3 participants