96 matches across 1 files for func main lang:Go path:src/bytes/bytes.go lang:Go path:src/bytes/bytes.go
snippet_mode: auto · sorted by relevance
src/bytes/bytes.go GO 96 matches · showing 5 view file →
3// license that can be found in the LICENSE file.
4
5// Package bytes implements functions for the manipulation of byte slices.
6// It is analogous to the facilities of the [strings] package.
7package bytes
· · ·
19// are the same length and contain the same bytes.
20// A nil argument is equivalent to an empty slice.
21func Equal(a, b []byte) bool {
22 // Neither cmd/compile nor gccgo allocates for these string conversions.
23 return string(a) == string(b)
· · ·
27// The result will be 0 if a == b, -1 if a < b, and +1 if a > b.
28// A nil argument is equivalent to an empty slice.
29func Compare(a, b []byte) int {
30 return bytealg.Compare(a, b)
31}
· · ·
33// explode splits s into a slice of UTF-8 sequences, one per Unicode code point (still slices of bytes),
34// up to a maximum of n byte slices. Invalid UTF-8 sequences are chopped into individual bytes.
35func explode(s []byte, n int) [][]byte {
36 if n <= 0 || n > len(s) {
37 n = len(s)
· · ·
56// Count counts the number of non-overlapping instances of sep in s.
57// If sep is an empty slice, Count returns 1 + the number of UTF-8-encoded code points in s.
58func Count(s, sep []byte) int {
59 // special case
60 if len(sep) == 0 {
+ 91 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.