texdatastringtable

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2019 License: Unlicense Imports: 2 Imported by: 3

Documentation

Index

Constants

View Source
const StringTableNullTerminator = "\x00"

StringTableNullTerminator string table entries are always null terminated

Variables

This section is empty.

Functions

This section is empty.

Types

type TexDataStringTable

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

TexDataStringTable info lookup table Constructs from TexDataStringData & TexDataStringTable lump datas

func NewTable

func NewTable(data string, lookupTable []int32) *TexDataStringTable

NewTable creates a new table from the contents of the TexDataStringData and TexDataStringTable lumps

func (*TexDataStringTable) AddOrFindString

func (table *TexDataStringTable) AddOrFindString(s string) (int, error)

AddOrFindString adds a new string to the Table, unless it exists Returns the stringID of the newly added string, or the existing one if found

func (*TexDataStringTable) GetString

func (table *TexDataStringTable) GetString(stringID int) (string, error)

GetString finds a string by StringID. StringID comes from TexDataStringData, and is a lookup to TexDataStringTable null escaped strings

Jump to

Keyboard shortcuts

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