https://github.com/galaco/stringtable
Source Engine StringTable implementation
https://github.com/galaco/stringtable
counter-strike-global-offensive counter-strike-source game-engine source-engine valve
Last synced: about 2 months ago
JSON representation
Source Engine StringTable implementation
- Host: GitHub
- URL: https://github.com/galaco/stringtable
- Owner: Galaco
- Created: 2019-09-13T02:00:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T14:42:56.000Z (about 2 years ago)
- Last Synced: 2025-02-13T19:03:03.090Z (about 1 year ago)
- Topics: counter-strike-global-offensive, counter-strike-source, game-engine, source-engine, valve
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://godoc.org/github.com/galaco/stringtable)
[](hhttps://goreportcard.com/report/github.com/galaco/stringtable)
[](https://golangci.com/r/github.com/galaco/stringtable)
[](https://codecov.io/gh/galaco/stringtable)
[](https://circleci.com/gh/galaco/stringtable)
# 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:
```go
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")
}
}