Equal returns whether the bytes in b are the same as the bytes in b2.
(b2 ByteView)
| 94 | // Equal returns whether the bytes in b are the same as the bytes in |
| 95 | // b2. |
| 96 | func (v ByteView) Equal(b2 ByteView) bool { |
| 97 | if b2.b == nil { |
| 98 | return v.EqualString(b2.s) |
| 99 | } |
| 100 | return v.EqualBytes(b2.b) |
| 101 | } |
| 102 | |
| 103 | // EqualString returns whether the bytes in b are the same as the bytes |
| 104 | // in s. |