Documentation ¶
Index ¶
- Variables
- func AcceptEOF(count int, c byte, err error) (int, bool, byte, error)
- func ConsumeEscaped(r io.ByteReader, w io.ByteWriter, plan string) error
- func ConsumeUntil(r io.ByteReader, w io.ByteWriter, stop func(byte) bool) (int, byte, error)
- func ExpectChar(r io.ByteReader, c byte) error
- func ExpectHexChar(r io.ByteReader) (byte, error)
- func ExpectOctCharExt(b0 byte, r io.ByteReader) (byte, error)
- func ExpectUnicodeChar(r io.ByteReader) (rune, error)
- func IgnoreCount(_ int, c byte, err error) (byte, error)
- func ReadRune(r io.ByteReader) (rune, int)
- func ReadRuneExt(b0 byte, r io.ByteReader) (rune, int)
- func ScannedBytes(s *MarkScanner, mark int, eof bool) []byte
- func Skip(r io.ByteReader, expect func(byte) bool) (int, byte, error)
- func Unread(r io.ByteScanner, eof bool, err error) error
- func UnsafeAt[T []byte | string](s T, pos int) byte
- func UnsafeFromString(s string) []byte
- func UnsafeSlice[T []byte | string](s T, lo int, hi int) []byte
- func UnsafeToString(b []byte) string
- func WriteRune(w io.ByteWriter, ru rune) error
- type CopyOnDiffWriter
- type LastByteWriter
- type MarkScanner
Constants ¶
This section is empty.
Variables ¶
View Source
var DummyWriter = &nopWriter{}
Functions ¶
func ConsumeEscaped ¶
func ConsumeEscaped(r io.ByteReader, w io.ByteWriter, plan string) error
func ConsumeUntil ¶
func ConsumeUntil(r io.ByteReader, w io.ByteWriter, stop func(byte) bool) (int, byte, error)
func ExpectChar ¶
func ExpectChar(r io.ByteReader, c byte) error
func ExpectHexChar ¶
func ExpectHexChar(r io.ByteReader) (byte, error)
func ExpectOctCharExt ¶
func ExpectOctCharExt(b0 byte, r io.ByteReader) (byte, error)
func ExpectUnicodeChar ¶
func ExpectUnicodeChar(r io.ByteReader) (rune, error)
func ReadRuneExt ¶
func ReadRuneExt(b0 byte, r io.ByteReader) (rune, int)
func ScannedBytes ¶
func ScannedBytes(s *MarkScanner, mark int, eof bool) []byte
func UnsafeFromString ¶
func UnsafeSlice ¶
UnsafeSlice implements the same functionality as `s[lo:hi]`, but without bounds check.
func UnsafeToString ¶
Types ¶
type CopyOnDiffWriter ¶
type CopyOnDiffWriter struct { Buf []byte // contains filtered or unexported fields }
func (*CopyOnDiffWriter) Bytes ¶
func (w *CopyOnDiffWriter) Bytes() []byte
func (*CopyOnDiffWriter) WriteByte ¶
func (w *CopyOnDiffWriter) WriteByte(c byte) error
type LastByteWriter ¶
type MarkScanner ¶
type MarkScanner struct { Buf []byte // contains filtered or unexported fields }
func NewMarkScanner ¶
func NewMarkScanner(b []byte) *MarkScanner
func (*MarkScanner) From ¶
func (s *MarkScanner) From(mark int) []byte
func (*MarkScanner) Mark ¶
func (s *MarkScanner) Mark(off int) int
func (*MarkScanner) ReadByte ¶
func (s *MarkScanner) ReadByte() (byte, error)
func (*MarkScanner) Resume ¶
func (s *MarkScanner) Resume(mark int) error
func (*MarkScanner) UnreadByte ¶
func (s *MarkScanner) UnreadByte() error
Click to show internal directories.
Click to hide internal directories.