bytes package - bytes - Go Packages
Package bytes implements functions for the manipulation of byte slices. It is analogous to the facilities of the strings package. MinRead is the minimum slice size passed to a Read call by Buffer.ReadFrom. As long as the Buffer has at least MinRead bytes beyond what is required to hold the contents of r, ReadFrom will not grow the underlying buffer. ErrTooLarge is passed to panic if memory cannot be allocated to store data in a buffer. Clone returns a copy of b[:len(b)]. The result may have additional unused capacity. Clone(nil) returns nil. Compare returns an integer comparing two byte slices lexicographically. The result will be 0 if a == b, -1 if a b. A nil argument is equivalent to an empty slice. Contains reports whether subslice is within b. ContainsAny reports whether any of the UTF-8-encoded code points in chars are within b. ContainsRune reports whether the rune is contained in the UTF-8-encoded byte slice b. Count counts the number of non-overlapping instan
Documentation ¶ Rendered for linux/amd64 windows/amd64 darwin/amd64 js/wasm Overview ¶ Package bytes implements functions for the manipulation of byte slices. It is analogous to the facilities of the strings package. Index ¶ Constants Variables func Clone(b []byte) []byte func Compare(a, b []byte) int func Contains(b, subslice []byte) bool func ContainsAny(b []byte, chars string) bool func ContainsFunc(b []byte, f func(rune) bool) bool func ContainsRune(b []byte, r rune) bool func Count(s, sep []byte) int func Cut(s, sep []byte) (before, after []byte, found bool) func CutPrefix(s, prefix []byt
Explore this link on the map →related reading
- Go Slices: usage and internals - The Go Programming Languagego.dev
- bookbear express | Ava | Substackavabear.xyz
- Go go-to guide · YourBasicyourbasic.org
- Effective Go - The Go Programming Languagego.dev
- The Slice Type - The Rust Programming Languagedoc.rust-lang.org
- GitHub - fatih/vim-go: Go development plugin for Vim · GitHubgithub.com
- sync package - sync - Go Packagespkg.go.dev
- GitHub - go-shiori/shiori: Simple bookmark manager built with Go · GitHubgithub.com
- Frequently Asked Questions (FAQ) - The Go Programming Languagego.dev
- Blake2b F precompile by pdyraga · Pull Request #4 · keep-network/go-ethereum · GitHubgithub.com
- Rust Iterator Cheat Sheetdanielkeep.github.io
- Library Functions | CS 161 Spring 2024sp24.cs161.org