Namespace: go.std.bytes
v1.0Contents
Summary
Provides a low-level interface to the bytes package.
Package bytes implements functions for the manipulation of byte slices.
It is analogous to the facilities of the strings package.
Index
- *Buffer
- *Reader
- Buffer
- Compare
- Contains
- ContainsAny
- ContainsRune
- Count
- Cut
- Equal
- EqualFold
- ErrTooLarge
- Fields
- HasPrefix
- HasSuffix
- Index
- IndexAny
- IndexByte
- IndexRune
- Join
- LastIndex
- LastIndexAny
- LastIndexByte
- MinRead
- NewBuffer
- NewBufferString
- NewReader
- Reader
- Repeat
- Replace
- ReplaceAll
- Runes
- Split
- SplitAfter
- SplitAfterN
- SplitN
- Title
- ToLower
- ToLowerSpecial
- ToTitle
- ToTitleSpecial
- ToUpper
- ToUpperSpecial
- ToValidUTF8
- Trim
- TrimLeft
- TrimPrefix
- TrimRight
- TrimSpace
- TrimSuffix
- arrayOfBuffer
- arrayOfReader
Legend
-
Constant
Variable
Function
Macro
Special form
Type
GoVar
Receiver/Method
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.-
MinRead
Int v1.0MinRead 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.
Variables
-
ErrTooLarge
Var v1.0ErrTooLarge is passed to panic if memory cannot be allocated to store data in a buffer.
Functions, Macros, and Special Forms
-
Compare
Function v1.0(Compare a b)
Compare returns an integer comparing two byte slices lexicographically.
The result will be 0 if a == b, -1 if a < b, and +1 if a > b.
A nil argument is equivalent to an empty slice.
Go input arguments: (a []byte, b []byte)
Go returns: int
Joker input arguments: [^arrayOfByte a, ^arrayOfByte b]
Joker returns: ^Int -
Contains
Function v1.0(Contains b subslice)
Contains reports whether subslice is within b.
Go input arguments: (b []byte, subslice []byte)
Go returns: bool
Joker input arguments: [^arrayOfByte b, ^arrayOfByte subslice]
Joker returns: ^Boolean -
ContainsAny
Function v1.0(ContainsAny b chars)
ContainsAny reports whether any of the UTF-8-encoded code points in chars are within b.
Go input arguments: (b []byte, chars string)
Go returns: bool
Joker input arguments: [^arrayOfByte b, ^String chars]
Joker returns: ^Boolean -
ContainsRune
Function v1.0(ContainsRune b r)
ContainsRune reports whether the rune is contained in the UTF-8-encoded byte slice b.
Go input arguments: (b []byte, r rune)
Go returns: bool
Joker input arguments: [^arrayOfByte b, ^Char r]
Joker returns: ^Boolean -
Count
Function v1.0(Count s sep)
Count counts the number of non-overlapping instances of sep in s.
If sep is an empty slice, Count returns 1 + the number of UTF-8-encoded code points in s.
Go input arguments: (s []byte, sep []byte)
Go returns: int
Joker input arguments: [^arrayOfByte s, ^arrayOfByte sep]
Joker returns: ^Int -
Cut
Function v1.0(Cut s sep)
Cut slices s around the first instance of sep,
returning the text before and after sep.
The found result reports whether sep appears in s.
If sep does not appear in s, cut returns s, nil, false.
Cut returns slices of the original slice s, not copies.
Go input arguments: (s []byte, sep []byte)
Go returns: (before []byte, after []byte, found bool)
Joker input arguments: [^arrayOfByte s, ^arrayOfByte sep]
Joker returns: [^arrayOfByte before, ^arrayOfByte after, ^Boolean found] -
Equal
Function v1.0(Equal a b)
Equal reports whether a and b
are the same length and contain the same bytes.
A nil argument is equivalent to an empty slice.
Go input arguments: (a []byte, b []byte)
Go returns: bool
Joker input arguments: [^arrayOfByte a, ^arrayOfByte b]
Joker returns: ^Boolean -
EqualFold
Function v1.0(EqualFold s t)
EqualFold reports whether s and t, interpreted as UTF-8 strings,
are equal under simple Unicode case-folding, which is a more general
form of case-insensitivity.
Go input arguments: (s []byte, t []byte)
Go returns: bool
Joker input arguments: [^arrayOfByte s, ^arrayOfByte t]
Joker returns: ^Boolean -
Fields
Function v1.0(Fields s)
Fields interprets s as a sequence of UTF-8-encoded code points.
It splits the slice s around each instance of one or more consecutive white space
characters, as defined by unicode.IsSpace, returning a slice of subslices of s or an
empty slice if s contains only white space.
Go input arguments: (s []byte)
Go returns: [][]byte
Joker input arguments: [^arrayOfByte s]
Joker returns: ^arrayOfarrayOfByte -
HasPrefix
Function v1.0(HasPrefix s prefix)
HasPrefix tests whether the byte slice s begins with prefix.
Go input arguments: (s []byte, prefix []byte)
Go returns: bool
Joker input arguments: [^arrayOfByte s, ^arrayOfByte prefix]
Joker returns: ^Boolean -
HasSuffix
Function v1.0(HasSuffix s suffix)
HasSuffix tests whether the byte slice s ends with suffix.
Go input arguments: (s []byte, suffix []byte)
Go returns: bool
Joker input arguments: [^arrayOfByte s, ^arrayOfByte suffix]
Joker returns: ^Boolean -
Index
Function v1.0(Index s sep)
Index returns the index of the first instance of sep in s, or -1 if sep is not present in s.
Go input arguments: (s []byte, sep []byte)
Go returns: int
Joker input arguments: [^arrayOfByte s, ^arrayOfByte sep]
Joker returns: ^Int -
IndexAny
Function v1.0(IndexAny s chars)
IndexAny interprets s as a sequence of UTF-8-encoded Unicode code points.
It returns the byte index of the first occurrence in s of any of the Unicode
code points in chars. It returns -1 if chars is empty or if there is no code
point in common.
Go input arguments: (s []byte, chars string)
Go returns: int
Joker input arguments: [^arrayOfByte s, ^String chars]
Joker returns: ^Int -
IndexByte
Function v1.0(IndexByte b c)
IndexByte returns the index of the first instance of c in b, or -1 if c is not present in b.
Go input arguments: (b []byte, c byte)
Go returns: int
Joker input arguments: [^arrayOfByte b, ^Byte c]
Joker returns: ^Int -
IndexRune
Function v1.0(IndexRune s r)
IndexRune interprets s as a sequence of UTF-8-encoded code points.
It returns the byte index of the first occurrence in s of the given rune.
It returns -1 if rune is not present in s.
If r is utf8.RuneError, it returns the first instance of any
invalid UTF-8 byte sequence.
Go input arguments: (s []byte, r rune)
Go returns: int
Joker input arguments: [^arrayOfByte s, ^Char r]
Joker returns: ^Int -
Join
Function v1.0(Join s sep)
Join concatenates the elements of s to create a new byte slice. The separator
sep is placed between elements in the resulting slice.
Go input arguments: (s [][]byte, sep []byte)
Go returns: []byte
Joker input arguments: [^arrayOfarrayOfByte s, ^arrayOfByte sep]
Joker returns: ^arrayOfByte -
LastIndex
Function v1.0(LastIndex s sep)
LastIndex returns the index of the last instance of sep in s, or -1 if sep is not present in s.
Go input arguments: (s []byte, sep []byte)
Go returns: int
Joker input arguments: [^arrayOfByte s, ^arrayOfByte sep]
Joker returns: ^Int -
LastIndexAny
Function v1.0(LastIndexAny s chars)
LastIndexAny interprets s as a sequence of UTF-8-encoded Unicode code
points. It returns the byte index of the last occurrence in s of any of
the Unicode code points in chars. It returns -1 if chars is empty or if
there is no code point in common.
Go input arguments: (s []byte, chars string)
Go returns: int
Joker input arguments: [^arrayOfByte s, ^String chars]
Joker returns: ^Int -
LastIndexByte
Function v1.0(LastIndexByte s c)
LastIndexByte returns the index of the last instance of c in s, or -1 if c is not present in s.
Go input arguments: (s []byte, c byte)
Go returns: int
Joker input arguments: [^arrayOfByte s, ^Byte c]
Joker returns: ^Int -
NewBuffer
Function v1.0(NewBuffer buf)
NewBuffer creates and initializes a new Buffer using buf as its
initial contents. The new Buffer takes ownership of buf, and the
caller should not use buf after this call. NewBuffer is intended to
prepare a Buffer to read existing data. It can also be used to set
the initial size of the internal buffer for writing. To do that,
buf should have the desired capacity but a length of zero.
In most cases, new(Buffer) (or just declaring a Buffer variable) is
sufficient to initialize a Buffer.
Go input arguments: (buf []byte)
Go returns: *Buffer
Joker input arguments: [^arrayOfByte buf]
Joker returns: ^*Buffer -
NewBufferString
Function v1.0(NewBufferString s)
NewBufferString creates and initializes a new Buffer using string s as its
initial contents. It is intended to prepare a buffer to read an existing
string.
In most cases, new(Buffer) (or just declaring a Buffer variable) is
sufficient to initialize a Buffer.
Go input arguments: (s string)
Go returns: *Buffer
Joker input arguments: [^String s]
Joker returns: ^*Buffer -
NewReader
Function v1.0(NewReader b)
NewReader returns a new Reader reading from b.
Go input arguments: (b []byte)
Go returns: *Reader
Joker input arguments: [^arrayOfByte b]
Joker returns: ^*Reader -
Repeat
Function v1.0(Repeat b count)
Repeat returns a new byte slice consisting of count copies of b.
It panics if count is negative or if
the result of (len(b) * count) overflows.
Go input arguments: (b []byte, count int)
Go returns: []byte
Joker input arguments: [^arrayOfByte b, ^Int count]
Joker returns: ^arrayOfByte -
Replace
Function v1.0(Replace s old new n)
Replace returns a copy of the slice s with the first n
non-overlapping instances of old replaced by new.
If old is empty, it matches at the beginning of the slice
and after each UTF-8 sequence, yielding up to k+1 replacements
for a k-rune slice.
If n < 0, there is no limit on the number of replacements.
Go input arguments: (s []byte, old []byte, new []byte, n int)
Go returns: []byte
Joker input arguments: [^arrayOfByte s, ^arrayOfByte old, ^arrayOfByte new, ^Int n]
Joker returns: ^arrayOfByte -
ReplaceAll
Function v1.0(ReplaceAll s old new)
ReplaceAll returns a copy of the slice s with all
non-overlapping instances of old replaced by new.
If old is empty, it matches at the beginning of the slice
and after each UTF-8 sequence, yielding up to k+1 replacements
for a k-rune slice.
Go input arguments: (s []byte, old []byte, new []byte)
Go returns: []byte
Joker input arguments: [^arrayOfByte s, ^arrayOfByte old, ^arrayOfByte new]
Joker returns: ^arrayOfByte -
Runes
Function v1.0(Runes s)
Runes interprets s as a sequence of UTF-8-encoded code points.
It returns a slice of runes (Unicode code points) equivalent to s.
Go input arguments: (s []byte)
Go returns: []rune
Joker input arguments: [^arrayOfByte s]
Joker returns: ^arrayOfChar -
Split
Function v1.0(Split s sep)
Split slices s into all subslices separated by sep and returns a slice of
the subslices between those separators.
If sep is empty, Split splits after each UTF-8 sequence.
It is equivalent to SplitN with a count of -1.
To split around the first instance of a separator, see Cut.
Go input arguments: (s []byte, sep []byte)
Go returns: [][]byte
Joker input arguments: [^arrayOfByte s, ^arrayOfByte sep]
Joker returns: ^arrayOfarrayOfByte -
SplitAfter
Function v1.0(SplitAfter s sep)
SplitAfter slices s into all subslices after each instance of sep and
returns a slice of those subslices.
If sep is empty, SplitAfter splits after each UTF-8 sequence.
It is equivalent to SplitAfterN with a count of -1.
Go input arguments: (s []byte, sep []byte)
Go returns: [][]byte
Joker input arguments: [^arrayOfByte s, ^arrayOfByte sep]
Joker returns: ^arrayOfarrayOfByte -
SplitAfterN
Function v1.0(SplitAfterN s sep n)
SplitAfterN slices s into subslices after each instance of sep and
returns a slice of those subslices.
If sep is empty, SplitAfterN splits after each UTF-8 sequence.
The count determines the number of subslices to return:
n > 0: at most n subslices; the last subslice will be the unsplit remainder.
n == 0: the result is nil (zero subslices)
n < 0: all subslices
Go input arguments: (s []byte, sep []byte, n int)
Go returns: [][]byte
Joker input arguments: [^arrayOfByte s, ^arrayOfByte sep, ^Int n]
Joker returns: ^arrayOfarrayOfByte -
SplitN
Function v1.0(SplitN s sep n)
SplitN slices s into subslices separated by sep and returns a slice of
the subslices between those separators.
If sep is empty, SplitN splits after each UTF-8 sequence.
The count determines the number of subslices to return:
n > 0: at most n subslices; the last subslice will be the unsplit remainder.
n == 0: the result is nil (zero subslices)
n < 0: all subslices
To split around the first instance of a separator, see Cut.
Go input arguments: (s []byte, sep []byte, n int)
Go returns: [][]byte
Joker input arguments: [^arrayOfByte s, ^arrayOfByte sep, ^Int n]
Joker returns: ^arrayOfarrayOfByte -
Title
Function v1.0(Title s)
Title treats s as UTF-8-encoded bytes and returns a copy with all Unicode letters that begin
words mapped to their title case.
Deprecated: The rule Title uses for word boundaries does not handle Unicode
punctuation properly. Use golang.org/x/text/cases instead.
Go input arguments: (s []byte)
Go returns: []byte
Joker input arguments: [^arrayOfByte s]
Joker returns: ^arrayOfByte -
ToLower
Function v1.0(ToLower s)
ToLower returns a copy of the byte slice s with all Unicode letters mapped to
their lower case.
Go input arguments: (s []byte)
Go returns: []byte
Joker input arguments: [^arrayOfByte s]
Joker returns: ^arrayOfByte -
ToLowerSpecial
Function v1.0(ToLowerSpecial c s)
ToLowerSpecial treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their
lower case, giving priority to the special casing rules.
Go input arguments: (c unicode.SpecialCase, s []byte)
Go returns: []byte
Joker input arguments: [^go.std.unicode/SpecialCase c, ^arrayOfByte s]
Joker returns: ^arrayOfByte -
ToTitle
Function v1.0(ToTitle s)
ToTitle treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their title case.
Go input arguments: (s []byte)
Go returns: []byte
Joker input arguments: [^arrayOfByte s]
Joker returns: ^arrayOfByte -
ToTitleSpecial
Function v1.0(ToTitleSpecial c s)
ToTitleSpecial treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their
title case, giving priority to the special casing rules.
Go input arguments: (c unicode.SpecialCase, s []byte)
Go returns: []byte
Joker input arguments: [^go.std.unicode/SpecialCase c, ^arrayOfByte s]
Joker returns: ^arrayOfByte -
ToUpper
Function v1.0(ToUpper s)
ToUpper returns a copy of the byte slice s with all Unicode letters mapped to
their upper case.
Go input arguments: (s []byte)
Go returns: []byte
Joker input arguments: [^arrayOfByte s]
Joker returns: ^arrayOfByte -
ToUpperSpecial
Function v1.0(ToUpperSpecial c s)
ToUpperSpecial treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their
upper case, giving priority to the special casing rules.
Go input arguments: (c unicode.SpecialCase, s []byte)
Go returns: []byte
Joker input arguments: [^go.std.unicode/SpecialCase c, ^arrayOfByte s]
Joker returns: ^arrayOfByte -
ToValidUTF8
Function v1.0(ToValidUTF8 s replacement)
ToValidUTF8 treats s as UTF-8-encoded bytes and returns a copy with each run of bytes
representing invalid UTF-8 replaced with the bytes in replacement, which may be empty.
Go input arguments: (s []byte, replacement []byte)
Go returns: []byte
Joker input arguments: [^arrayOfByte s, ^arrayOfByte replacement]
Joker returns: ^arrayOfByte -
Trim
Function v1.0(Trim s cutset)
Trim returns a subslice of s by slicing off all leading and
trailing UTF-8-encoded code points contained in cutset.
Go input arguments: (s []byte, cutset string)
Go returns: []byte
Joker input arguments: [^arrayOfByte s, ^String cutset]
Joker returns: ^arrayOfByte -
TrimLeft
Function v1.0(TrimLeft s cutset)
TrimLeft returns a subslice of s by slicing off all leading
UTF-8-encoded code points contained in cutset.
Go input arguments: (s []byte, cutset string)
Go returns: []byte
Joker input arguments: [^arrayOfByte s, ^String cutset]
Joker returns: ^arrayOfByte -
TrimPrefix
Function v1.0(TrimPrefix s prefix)
TrimPrefix returns s without the provided leading prefix string.
If s doesn't start with prefix, s is returned unchanged.
Go input arguments: (s []byte, prefix []byte)
Go returns: []byte
Joker input arguments: [^arrayOfByte s, ^arrayOfByte prefix]
Joker returns: ^arrayOfByte -
TrimRight
Function v1.0(TrimRight s cutset)
TrimRight returns a subslice of s by slicing off all trailing
UTF-8-encoded code points that are contained in cutset.
Go input arguments: (s []byte, cutset string)
Go returns: []byte
Joker input arguments: [^arrayOfByte s, ^String cutset]
Joker returns: ^arrayOfByte -
TrimSpace
Function v1.0(TrimSpace s)
TrimSpace returns a subslice of s by slicing off all leading and
trailing white space, as defined by Unicode.
Go input arguments: (s []byte)
Go returns: []byte
Joker input arguments: [^arrayOfByte s]
Joker returns: ^arrayOfByte -
TrimSuffix
Function v1.0(TrimSuffix s suffix)
TrimSuffix returns s without the provided trailing suffix string.
If s doesn't end with suffix, s is returned unchanged.
Go input arguments: (s []byte, suffix []byte)
Go returns: []byte
Joker input arguments: [^arrayOfByte s, ^arrayOfByte suffix]
Joker returns: ^arrayOfByte
Types
-
*Buffer
Concrete Type v1.0A Buffer is a variable-sized buffer of bytes with Read and Write methods.
The zero value for Buffer is an empty buffer ready to use.
-
Bytes
Receiver for *Buffer v1.0([])
Bytes returns a slice of length b.Len() holding the unread portion of the buffer.
The slice is valid for use only until the next buffer modification (that is,
only until the next call to a method like Read, Write, Reset, or Truncate).
The slice aliases the buffer content at least until the next buffer modification,
so immediate changes to the slice will affect the result of future reads.
-
Cap
Receiver for *Buffer v1.0([])
Cap returns the capacity of the buffer's underlying byte slice, that is, the
total space allocated for the buffer's data.
-
Grow
Receiver for *Buffer v1.0([n])
Grow grows the buffer's capacity, if necessary, to guarantee space for
another n bytes. After Grow(n), at least n bytes can be written to the
buffer without another allocation.
If n is negative, Grow will panic.
If the buffer can't grow it will panic with ErrTooLarge.
-
Len
Receiver for *Buffer v1.0([])
Len returns the number of bytes of the unread portion of the buffer;
b.Len() == len(b.Bytes()).
-
Next
Receiver for *Buffer v1.0([n])
Next returns a slice containing the next n bytes from the buffer,
advancing the buffer as if the bytes had been returned by Read.
If there are fewer than n bytes in the buffer, Next returns the entire buffer.
The slice is only valid until the next call to a read or write method.
-
Read
Receiver for *Buffer v1.0([p])
Read reads the next len(p) bytes from the buffer or until the buffer
is drained. The return value n is the number of bytes read. If the
buffer has no data to return, err is io.EOF (unless len(p) is zero);
otherwise it is nil.
-
ReadByte
Receiver for *Buffer v1.0([])
ReadByte reads and returns the next byte from the buffer.
If no byte is available, it returns error io.EOF.
-
ReadBytes
Receiver for *Buffer v1.0([delim])
ReadBytes reads until the first occurrence of delim in the input,
returning a slice containing the data up to and including the delimiter.
If ReadBytes encounters an error before finding a delimiter,
it returns the data read before the error and the error itself (often io.EOF).
ReadBytes returns err != nil if and only if the returned data does not end in
delim.
-
ReadFrom
Receiver for *Buffer v1.0([r])
ReadFrom reads data from r until EOF and appends it to the buffer, growing
the buffer as needed. The return value n is the number of bytes read. Any
error except io.EOF encountered during the read is also returned. If the
buffer becomes too large, ReadFrom will panic with ErrTooLarge.
-
ReadRune
Receiver for *Buffer v1.0([])
ReadRune reads and returns the next UTF-8-encoded
Unicode code point from the buffer.
If no bytes are available, the error returned is io.EOF.
If the bytes are an erroneous UTF-8 encoding, it
consumes one byte and returns U+FFFD, 1.
-
ReadString
Receiver for *Buffer v1.0([delim])
ReadString reads until the first occurrence of delim in the input,
returning a string containing the data up to and including the delimiter.
If ReadString encounters an error before finding a delimiter,
it returns the data read before the error and the error itself (often io.EOF).
ReadString returns err != nil if and only if the returned data does not end
in delim.
-
Reset
Receiver for *Buffer v1.0([])
Reset resets the buffer to be empty,
but it retains the underlying storage for use by future writes.
Reset is the same as Truncate(0).
-
String
Receiver for *Buffer v1.0([])
String returns the contents of the unread portion of the buffer
as a string. If the Buffer is a nil pointer, it returns "<nil>".
To build strings more efficiently, see the strings.Builder type.
-
Truncate
Receiver for *Buffer v1.0([n])
Truncate discards all but the first n unread bytes from the buffer
but continues to use the same allocated storage.
It panics if n is negative or greater than the length of the buffer.
-
UnreadByte
Receiver for *Buffer v1.0([])
UnreadByte unreads the last byte returned by the most recent successful
read operation that read at least one byte. If a write has happened since
the last read, if the last read returned an error, or if the read read zero
bytes, UnreadByte returns an error.
-
UnreadRune
Receiver for *Buffer v1.0([])
UnreadRune unreads the last rune returned by ReadRune.
If the most recent read or write operation on the buffer was
not a successful ReadRune, UnreadRune returns an error. (In this regard
it is stricter than UnreadByte, which will unread the last byte
from any read operation.)
-
Write
Receiver for *Buffer v1.0([p])
Write appends the contents of p to the buffer, growing the buffer as
needed. The return value n is the length of p; err is always nil. If the
buffer becomes too large, Write will panic with ErrTooLarge.
-
WriteByte
Receiver for *Buffer v1.0([c])
WriteByte appends the byte c to the buffer, growing the buffer as needed.
The returned error is always nil, but is included to match bufio.Writer's
WriteByte. If the buffer becomes too large, WriteByte will panic with
ErrTooLarge.
-
WriteRune
Receiver for *Buffer v1.0([r])
WriteRune appends the UTF-8 encoding of Unicode code point r to the
buffer, returning its length and an error, which is always nil but is
included to match bufio.Writer's WriteRune. The buffer is grown as needed;
if it becomes too large, WriteRune will panic with ErrTooLarge.
-
WriteString
Receiver for *Buffer v1.0([s])
WriteString appends the contents of s to the buffer, growing the buffer as
needed. The return value n is the length of s; err is always nil. If the
buffer becomes too large, WriteString will panic with ErrTooLarge.
-
WriteTo
Receiver for *Buffer v1.0([w])
WriteTo writes data to w until the buffer is drained or an error occurs.
The return value n is the number of bytes written; it always fits into an
int, but it is int64 to match the io.WriterTo interface. Any error
encountered during the write is also returned.
-
*Reader
Concrete Type v1.0A Reader implements the io.Reader, io.ReaderAt, io.WriterTo, io.Seeker,
io.ByteScanner, and io.RuneScanner interfaces by reading from
a byte slice.
Unlike a Buffer, a Reader is read-only and supports seeking.
The zero value for Reader operates like a Reader of an empty slice.
-
Len
Receiver for *Reader v1.0([])
Len returns the number of bytes of the unread portion of the
slice.
-
Read
Receiver for *Reader v1.0([b])
Read implements the io.Reader interface.
-
ReadAt
Receiver for *Reader v1.0([b off])
ReadAt implements the io.ReaderAt interface.
-
ReadByte
Receiver for *Reader v1.0([])
ReadByte implements the io.ByteReader interface.
-
ReadRune
Receiver for *Reader v1.0([])
ReadRune implements the io.RuneReader interface.
-
Reset
Receiver for *Reader v1.0([b])
Reset resets the Reader to be reading from b.
-
Seek
Receiver for *Reader v1.0([offset whence])
Seek implements the io.Seeker interface.
-
Size
Receiver for *Reader v1.0([])
Size returns the original length of the underlying byte slice.
Size is the number of bytes available for reading via ReadAt.
The result is unaffected by any method calls except Reset.
-
UnreadByte
Receiver for *Reader v1.0([])
UnreadByte complements ReadByte in implementing the io.ByteScanner interface.
-
UnreadRune
Receiver for *Reader v1.0([])
UnreadRune complements ReadRune in implementing the io.RuneScanner interface.
-
WriteTo
Receiver for *Reader v1.0([w])
WriteTo implements the io.WriterTo interface.
-
Buffer
Concrete Type v1.0A Buffer is a variable-sized buffer of bytes with Read and Write methods.
The zero value for Buffer is an empty buffer ready to use.
-
Reader
Concrete Type v1.0A Reader implements the io.Reader, io.ReaderAt, io.WriterTo, io.Seeker,
io.ByteScanner, and io.RuneScanner interfaces by reading from
a byte slice.
Unlike a Buffer, a Reader is read-only and supports seeking.
The zero value for Reader operates like a Reader of an empty slice.
-
arrayOfBuffer
Concrete Type v1.0A Buffer is a variable-sized buffer of bytes with Read and Write methods.
The zero value for Buffer is an empty buffer ready to use.
-
arrayOfReader
Concrete Type v1.0A Reader implements the io.Reader, io.ReaderAt, io.WriterTo, io.Seeker,
io.ByteScanner, and io.RuneScanner interfaces by reading from
a byte slice.
Unlike a Buffer, a Reader is read-only and supports seeking.
The zero value for Reader operates like a Reader of an empty slice.