github.com/bir3/gocompiler@v0.9.2202/src/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  
     7  package bytealg
     8  
     9  // Index returns the index of the first instance of b in a, or -1 if b is not present in a.
    10  // Requires 2 <= len(b) <= MaxLen.
    11  //
    12  //go:noescape
    13  func Index(a, b []byte) int
    14  
    15  // IndexString returns the index of the first instance of b in a, or -1 if b is not present in a.
    16  // Requires 2 <= len(b) <= MaxLen.
    17  //
    18  //go:noescape
    19  func IndexString(a, b string) int