Skip to content

proposal: x/text: add replace package #40338

@icholy

Description

@icholy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions