Skip to content

Galaco/stringtable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc Go report card GolangCI codecov CircleCI

Stringtable

Stringtable is an indexed lookuptable containing 0 or more strings.

Usage

Stringtable is a simple package. You can either:

  • Create a new table
  • Create a table from existing stringtable data (e.g. TexDataString* BSP lumps)

Here is a simple example:

package main

import "github.com/galaco/stringtable"

func main() {
    table := stringtable.New()
    val := "foo"
    index := table.AddString(val)

    s,err := table.FindString(index)
    if err != nil {
        panic(err)
    }
    if s != val {
        panic("returned string doesnt match stored")
    }
}

About

Source Engine StringTable implementation

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages