Documentation ¶
Overview ¶
helper is helper functions used for commonly used functions
Index ¶
- func AtoB(s string) bool
- func AtoF32(s string) float32
- func AtoF64(s string) float64
- func AtoI16(s string) int16
- func AtoI32(s string) int32
- func AtoI8(s string) int8
- func AtoU16(s string) uint16
- func AtoU32(s string) uint32
- func AtoU8(s string) uint8
- func BaseName(in string) string
- func Clean(in string) string
- func Deflate(in []byte) ([]byte, error)
- func EulerToQuaternion(in [3]float32) [4]float32
- func FilenameCRC32(name string) uint32
- func GenerateCRC16(data []byte) (checksum uint16, err error)
- func GenerateCRC32(data []byte) (checksum uint32, err error)
- func Inflate(in []byte, size int) ([]byte, error)
- func IsFile(path string) bool
- func NumberEnding(in string) int
- func ParseBool(s string, fallback bool) bool
- func ParseFloat(s string, fallback float64) float64
- func ParseFloat32(s string, fallback float32) float32
- func ParseFloat64(s string, fallback float64) float64
- func ParseInt(s string, fallback int) int
- func ParseInt32(s string, fallback int32) int32
- func ParseInt64(s string, fallback int64) int64
- func ParseInt8(s string, fallback int8) int8
- func ParseUint(s string, fallback uint) uint
- func ParseUint32(s string, fallback uint32) uint32
- func ParseUint64(s string, fallback uint64) uint64
- func ParseUint8(s string, fallback uint8) uint8
- func Pluralize(in int) string
- func ReadFile(path string) ([]string, error)
- func ReadFixedString(r io.Reader, size uint32) (string, error)
- func ReadString(r io.ReadSeeker) (string, error)
- func ReadStringHash(hash []byte) string
- func SpriteModelEnding(in string) (int, int)
- func Validate(data []byte) error
- func Write(data []byte, w io.Writer) error
- func WriteFixedString(w io.Writer, in string, size int) error
- func WriteString(w io.Writer, in string) error
- func WriteStringHash(hash string) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EulerToQuaternion ¶
func FilenameCRC32 ¶
FilenameCRC32 returns the CRC of a file's name
func GenerateCRC16 ¶
GenerateCRC16 places a checksum on the last 2 bytes of writer
func GenerateCRC32 ¶
GenerateCRC32 places a checksum on the last 4 bytes of writer
func NumberEnding ¶
NumberEnding returns a numeric ending to a string with ending pattern _00
func ParseFloat ¶
ParseFloat parses a float from a string, returning fallback if it fails
func ParseFloat32 ¶
ParseFloat32 parses a float32 from a string, returning fallback if it fails
func ParseFloat64 ¶
ParseFloat64 parses a float64 from a string, returning fallback if it fails
func ParseInt32 ¶
ParseInt32 parses a int32 from a string, returning fallback if it fails
func ParseInt64 ¶
ParseInt64 parses a int64 from a string, returning fallback if it fails
func ParseUint32 ¶
ParseUint32 parses a uint32 from a string, returning fallback if it fails
func ParseUint64 ¶
ParseUint64 parses a uint64 from a string, returning fallback if it fails
func ParseUint8 ¶
ParseUint8 parses a uint8 from a string, returning fallback if it fails
func ReadString ¶
func ReadString(r io.ReadSeeker) (string, error)
ReadString is used to read a CString (zero terminated) from r
func ReadStringHash ¶
func SpriteModelEnding ¶
func WriteFixedString ¶
WriteFixedString will write a string and pad 0x00 until size is satisfied
func WriteString ¶
WriteString is used to write a CString (zero terminated) to w
func WriteStringHash ¶
Types ¶
This section is empty.