diff options
| author | psydvl <[email protected]> | 2025-04-08 10:36:14 +0300 | 
|---|---|---|
| committer | psydvl <[email protected]> | 2025-04-08 10:52:23 +0300 | 
| commit | 7a18199f121713027e60ca856a08c77d26fdf0a9 (patch) | |
| tree | b1becf66247c9083390d0d280fb7394c5d0920e2 /contrib/go/_std_1.23/src/strconv/bytealg_bootstrap.go | |
| parent | e3a2c25a704d383a210e7060f6d2937930238283 (diff) | |
go1.23 switch
Переключение Go на 1.23
Тулчейн с исходниками положен в PR:7442346
commit_hash:a56e7228a1eab335f40c731dc6a103945515cd70
Diffstat (limited to 'contrib/go/_std_1.23/src/strconv/bytealg_bootstrap.go')
| -rw-r--r-- | contrib/go/_std_1.23/src/strconv/bytealg_bootstrap.go | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/go/_std_1.23/src/strconv/bytealg_bootstrap.go b/contrib/go/_std_1.23/src/strconv/bytealg_bootstrap.go new file mode 100644 index 00000000000..12d96e5b531 --- /dev/null +++ b/contrib/go/_std_1.23/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. + +//go:build compiler_bootstrap + +package strconv + +// index returns the index of the first instance of c in s, or -1 if missing. +func index(s string, c byte) int { +	for i := 0; i < len(s); i++ { +		if s[i] == c { +			return i +		} +	} +	return -1 +}  | 
