bytesreplacer

package module
v0.0.0-...-528e5b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2016 License: BSD-3-Clause Imports: 2 Imported by: 0

README

go-bytesreplacer

Package bytesreplacer provides a utility for replacing parts of byte slices.

This package was merged into go4.org/bytereplacer. This package exists only for compatibility with existing code. All code should migrate to using go4.org/bytereplacer in their imports.

Documentation

Overview

Package bytesreplacer provides a utility for replacing parts of byte slices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Replacer

type Replacer struct {
	*bytereplacer.Replacer
}

Replacer replaces a list of strings with replacements. It is safe for concurrent use by multiple goroutines.

func New

func New(oldnew ...string) *Replacer

New returns a new Replacer from a list of old, new string pairs. Replacements are performed in order, without overlapping matches.

func (*Replacer) Write

func (r *Replacer) Write(w io.Writer, s []byte) (n int, err error)

Write writes s to w with all replacements performed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL