Copy copies b into dest and returns the number of bytes copied.
(dest []byte)
| 85 | |
| 86 | // Copy copies b into dest and returns the number of bytes copied. |
| 87 | func (v ByteView) Copy(dest []byte) int { |
| 88 | if v.b != nil { |
| 89 | return copy(dest, v.b) |
| 90 | } |
| 91 | return copy(dest, v.s) |
| 92 | } |
| 93 | |
| 94 | // Equal returns whether the bytes in b are the same as the bytes in |
| 95 | // b2. |
no outgoing calls