String returns the data as a string, making a copy if necessary.
()
| 53 | |
| 54 | // String returns the data as a string, making a copy if necessary. |
| 55 | func (v ByteView) String() string { |
| 56 | if v.b != nil { |
| 57 | return string(v.b) |
| 58 | } |
| 59 | return v.s |
| 60 | } |
| 61 | |
| 62 | // At returns the byte at index i. |
| 63 | func (v ByteView) At(i int) byte { |
no outgoing calls