aboutsummaryrefslogtreecommitdiff
path: root/src/strconv/bytealg_bootstrap.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/strconv/bytealg_bootstrap.go')
-rw-r--r--src/strconv/bytealg_bootstrap.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/strconv/bytealg_bootstrap.go b/src/strconv/bytealg_bootstrap.go
new file mode 100644
index 0000000000..a3a547d1b6
--- /dev/null
+++ b/src/strconv/bytealg_bootstrap.go
@@ -0,0 +1,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
+}