2016-08-05 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / libgo / go / bytes / bytes_decl.go
blobdf0614fed0df019de85f7dcaca42f59c64e39429
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.
5 package bytes
7 //go:noescape
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
12 //go:noescape
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
19 //go:noescape
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