package
0.21.0
Repository: https://go.googlesource.com/text
Documentation: pkg.go.dev

# Functions

Append appends the result of converting src[:n] using t to dst, where n <= len(src), If err == nil, n will be len(src).
Bytes returns a new byte slice with the result of converting b[:n] using t, where n <= len(b).
Chain returns a Transformer that applies t in sequence.
NewReader returns a new Reader that wraps r by transforming the bytes read via t.
NewWriter returns a new Writer that wraps w by transforming the bytes written via t.
Deprecated: Use runes.Remove instead.
String returns a string with the result of converting s[:n] using t, where n <= len(s).

# Variables

Discard is a Transformer for which all Transform calls succeed by consuming all bytes and writing nothing.
ErrEndOfSpan means that the input and output (the transformed input) are not identical.
ErrShortDst means that the destination buffer was too short to receive all of the transformed bytes.
ErrShortSrc means that the source buffer has insufficient data to complete the transformation.
Nop is a SpanningTransformer that copies src to dst.

# Structs

NopResetter can be embedded by implementations of Transformer to add a nop Reset method.
Reader wraps another io.Reader by transforming the bytes read.
Writer wraps another io.Writer by transforming the bytes read.

# Interfaces

SpanningTransformer extends the Transformer interface with a Span method that determines how much of the input already conforms to the Transformer.
Transformer transforms bytes.