github.com/gidoBOSSftw5731/go/src@v0.0.0-20210226122457-d24b0edbf019/strconv/bytealg_bootstrap.go (about)

     1  // Copyright 2020 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 compiler_bootstrap
     6  // +build compiler_bootstrap
     7  
     8  package strconv
     9  
    10  // contains reports whether the string contains the byte c.
    11  func contains(s string, c byte) bool {
    12  	for i := 0; i < len(s); i++ {
    13  		if s[i] == c {
    14  			return true
    15  		}
    16  	}
    17  	return false
    18  }