...
1
2
3
4
5 package precis
6
7 import "golang.org/x/text/transform"
8
9
10 type Transformer struct {
11 t transform.Transformer
12 }
13
14
15 func (t Transformer) Reset() { t.t.Reset() }
16
17
18 func (t Transformer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
19 return t.t.Transform(dst, src, atEOF)
20 }
21
22
23 func (t Transformer) Bytes(b []byte) []byte {
24 b, _, _ = transform.Bytes(t, b)
25 return b
26 }
27
28
29 func (t Transformer) String(s string) string {
30 s, _, _ = transform.String(t, s)
31 return s
32 }
33
View as plain text