github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/bytealg/equal_generic.go (about)

     1  // Copyright 2019 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package bytealg
     6  
     7  // Equal reports whether a and b
     8  // are the same length and contain the same bytes.
     9  // A nil argument is equivalent to an empty slice.
    10  //
    11  // Equal is equivalent to bytes.Equal.
    12  // It is provided here for convenience,
    13  // because some packages cannot depend on bytes.
    14  func Equal(a, b []byte) bool