Documentation ¶
Overview ¶
Package zbyte implements functions for byte slices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Binary ¶
Binary reports if this looks like binary data.
Something is considered binary if it contains a NULL byte in the first 8000 bytes.
This is the same check as git uses; see buffer_is_binary().
func HasPrefixes ¶
HasPrefixes tests whether the byte slice b starts with any of the prefixes.
Identical to:
bytes.HasPrefix(s, "one") || bytes.HasPrefix(s, "two")
func HasSuffixes ¶
HasSuffixes tests whether the byte slice b ends with any of the suffixes.
Identical to:
bytes.HasSuffix(s, "one") || bytes.HasSuffix(s, "two")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.