d2txt

package module
v0.0.0-...-757b22e Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

README

Go Report Card GoDoc

Description

This is a module used to decoding and encoding Diablo II Data Dictionary files (TXT)

this module is a modified copy of Open Diablo II d2txt package

Documentation

Overview

Package d2txt provides a parser implementation for diablo TSV data files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataDictionary

type DataDictionary struct {
	Records [][]string
	// contains filtered or unexported fields
}

DataDictionary represents a data file (Excel)

func Load

func Load(buf []byte) (*DataDictionary, error)

Load loads the contents of a spreadsheet style txt file

func (*DataDictionary) Bool

func (d *DataDictionary) Bool(field string) bool

Bool gets a bool value for the given column

func (*DataDictionary) Encode

func (d *DataDictionary) Encode() ([]byte, error)

Encode encodes data dictionary into a byte slice

func (*DataDictionary) List

func (d *DataDictionary) List(field string) []string

List splits a delimited list from the given column

func (*DataDictionary) Next

func (d *DataDictionary) Next() (isntLast bool)

Next reads the next row, skips Expansion lines or returns false when the end of a file is reached or an error occurred

func (*DataDictionary) Number

func (d *DataDictionary) Number(field string) int

Number gets a number for the given column

func (*DataDictionary) Reset

func (d *DataDictionary) Reset()

Reset sets position to 0

func (*DataDictionary) String

func (d *DataDictionary) String(field string) string

String gets a string from the given column

Jump to

Keyboard shortcuts

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