uncsv

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cell

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

func (Cell) IsQuoted

func (c Cell) IsQuoted() bool

func (Cell) Modified

func (c Cell) Modified() bool

func (*Cell) Original added in v1.9.4

func (c *Cell) Original() []byte

func (Cell) Quote

func (c Cell) Quote(mode *Mode) Cell

func (*Cell) Restore

func (c *Cell) Restore(mode *Mode)

func (Cell) Source

func (c Cell) Source() []byte

func (Cell) SourceText

func (c Cell) SourceText(m *Mode) string

func (Cell) Text

func (c Cell) Text() string

type Mode

type Mode struct {
	NonUTF8     bool
	Comma       byte
	DefaultTerm string
	// contains filtered or unexported fields
}

func (*Mode) Dump

func (mode *Mode) Dump(rows []Row, w io.Writer)

func (*Mode) DumpBy

func (mode *Mode) DumpBy(fetch func() *Row, w io.Writer)

func (*Mode) HasBom

func (m *Mode) HasBom() bool

func (*Mode) IsUTF16BE

func (m *Mode) IsUTF16BE() bool

func (*Mode) IsUTF16LE

func (m *Mode) IsUTF16LE() bool

func (*Mode) SetEncoding

func (m *Mode) SetEncoding(name string) error

func (*Mode) SetUTF16BE added in v1.7.0

func (m *Mode) SetUTF16BE()

func (*Mode) SetUTF16LE added in v1.7.0

func (m *Mode) SetUTF16LE()

type Row

type Row struct {
	// Cell must have one or more element at least
	Cell []Cell
	// Term is one of "", "\n", and "\r\n"
	Term string
}

func NewRow

func NewRow(mode *Mode) Row

func ReadAll

func ReadAll(r io.Reader, mode *Mode) ([]Row, error)

func ReadLine

func ReadLine(br *bufio.Reader, mode *Mode) (*Row, error)

func (*Row) Delete

func (row *Row) Delete(i int)

func (*Row) Insert

func (row *Row) Insert(i int, text string, mode *Mode)

func (*Row) Rebuild

func (row *Row) Rebuild(mode *Mode) []byte

func (*Row) Replace

func (row *Row) Replace(i int, text string, mode *Mode)

Jump to

Keyboard shortcuts

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