main.go 235 B

1234567891011121314
  1. package yu_bytes
  2. import (
  3. "unsafe"
  4. )
  5. func Equals(val ...[]byte) bool {
  6. for j_i := 1; j_i < len(val); j_i++ {
  7. if *(*string)(unsafe.Pointer(&val[0])) != *(*string)(unsafe.Pointer(&val[j_i])) {
  8. return false
  9. }
  10. }
  11. return true
  12. }