talkio

package
v0.0.0-...-239939c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringReader

type StringReader struct {
	// contains filtered or unexported fields
}

A StringReader implements the io.StringReader, io.ReaderAt, io.Seeker, io.WriterTo, io.ByteScanner, and io.RuneScanner interfaces by reading from a string.

func NewReader

func NewReader(s string) *StringReader

NewReader returns a new StringReader reading from s. It is similar to bytes.NewBufferString but more efficient and read-only.

func (*StringReader) AtEnd

func (r *StringReader) AtEnd() bool

func (*StringReader) GetPosition

func (r *StringReader) GetPosition() int64

func (*StringReader) Len

func (r *StringReader) Len() int

Len returns the number of bytes of the unread portion of the string.

func (*StringReader) PeekRune

func (r *StringReader) PeekRune() rune

func (*StringReader) PeekRuneError

func (r *StringReader) PeekRuneError() (ch rune, err error)

func (*StringReader) PeekRuneFor

func (r *StringReader) PeekRuneFor(character rune) bool

func (*StringReader) Read

func (r *StringReader) Read(b []byte) (n int, err error)

func (*StringReader) ReadAt

func (r *StringReader) ReadAt(b []byte, off int64) (n int, err error)

func (*StringReader) ReadByte

func (r *StringReader) ReadByte() (byte, error)

func (*StringReader) ReadRune

func (r *StringReader) ReadRune() (ch rune, size int, err error)

func (*StringReader) ReadRunes

func (r *StringReader) ReadRunes(amount int64) ([]rune, error)

func (*StringReader) Reset

func (r *StringReader) Reset(s string)

Reset resets the StringReader to be reading from s.

func (*StringReader) SetPosition

func (r *StringReader) SetPosition(position int64) error

func (*StringReader) Size

func (r *StringReader) Size() int64

Size returns the original length of the underlying string. Size is the number of bytes available for reading via ReadAt. The returned value is always the same and is not affected by calls to any other method.

func (*StringReader) Skip

func (r *StringReader) Skip(posOffset int64) error

func (*StringReader) UnreadByte

func (r *StringReader) UnreadByte() error

func (*StringReader) UnreadRune

func (r *StringReader) UnreadRune() error

func (*StringReader) WriteTo

func (r *StringReader) WriteTo(w io.Writer) (n int64, err error)

WriteTo implements the io.WriterTo interface.

type StringWriter

type StringWriter struct {
	strings.Builder
}

func (*StringWriter) GetPosition

func (w *StringWriter) GetPosition() int64

func (*StringWriter) SetPosition

func (w *StringWriter) SetPosition(position int64) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL