gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/internal/bytealg/index_native.go (about) 1 // Copyright 2018 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 //go:build amd64 || arm64 || s390x || ppc64le || ppc64 6 // +build amd64 arm64 s390x ppc64le ppc64 7 8 package bytealg 9 10 //go:noescape 11 12 // Index returns the index of the first instance of b in a, or -1 if b is not present in a. 13 // Requires 2 <= len(b) <= MaxLen. 14 func Index(a, b []byte) int 15 16 //go:noescape 17 18 // IndexString returns the index of the first instance of b in a, or -1 if b is not present in a. 19 // Requires 2 <= len(b) <= MaxLen. 20 func IndexString(a, b string) int