aboutsummaryrefslogtreecommitdiff
path: root/src/strconv/bytealg_bootstrap.go
blob: a3a547d1b639a87cdddd4aecd0c5635f8f810549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build compiler_bootstrap

package strconv

// contains reports whether the string contains the byte c.
func contains(s string, c byte) bool {
	for i := 0; i < len(s); i++ {
		if s[i] == c {
			return true
		}
	}
	return false
}