1 // Copyright 2015 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 // -build !amd64,!s390x
9 // TODO: implements short string optimization on non amd64 platforms
10 // and get rid of bytes_amd64.go
12 // Index returns the index of the first instance of sep in s, or -1 if sep is not present in s.
13 func Index(s
, sep
[]byte) int {
23 return IndexByte(s
, c
)
29 o
:= IndexByte(t
[i
:], c
)
35 if Equal(s
[i
:i
+n
], sep
) {