github.com/karrick/go@v0.0.0-20170817181416-d5b0ec858b37/src/bytes/bytes_decl.go (about) 1 // Copyright 2010 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 bytes 6 7 //go:noescape 8 9 // IndexByte returns the index of the first instance of c in s, or -1 if c is not present in s. 10 func IndexByte(s []byte, c byte) int // ../runtime/asm_$GOARCH.s 11 12 //go:noescape 13 14 // Equal returns a boolean reporting whether a and b 15 // are the same length and contain the same bytes. 16 // A nil argument is equivalent to an empty slice. 17 func Equal(a, b []byte) bool // ../runtime/asm_$GOARCH.s 18 19 //go:noescape 20 21 // Compare returns an integer comparing two byte slices lexicographically. 22 // The result will be 0 if a==b, -1 if a < b, and +1 if a > b. 23 // A nil argument is equivalent to an empty slice. 24 func Compare(a, b []byte) int // ../runtime/noasm.go or ../runtime/asm_{386,amd64}.s