glp

package module
v0.0.0-...-0560f08 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: MIT Imports: 5 Imported by: 0

README

Gopher Lua Packages for Vikingo Engine

crypto Package

Method Description Parameters Returns
md5 Computes MD5 hash of string string string (hex)
sha1 Computes SHA1 hash of string string string (hex)
sha256 Computes SHA256 hash of string string string (hex)
sha512 Computes SHA512 hash of string string string (hex)
xor Performs XOR operation between data and key data, key (number/string/table) data (same type as input data)

encoding Package

Method Description Parameters Returns
hex_encode Encodes string to hex string string (hex)
hex_decode Decodes hex string string (hex) string, error
url_encode URL encodes string string string (encoded)
url_decode URL decodes string string (encoded) string, error
base64_encode Encodes string to base64 string string (base64)
base64_decode Decodes base64 string string (base64) string, error
puny_encode Encodes string to Punycode string string, error
puny_decode Decodes Punycode string string (punycode) string, error

strings Package

Method Description Parameters Returns
split Splits string by separator string, separator table (array of strings)
fields Splits string by whitespace string table (array of strings)
has_prefix Checks if string has prefix string, prefix boolean
has_suffix Checks if string has suffix string, suffix boolean
trim Removes characters from start and end string, cutset string
trim_space Removes whitespace from start and end string string
trim_prefix Removes prefix string, prefix string
trim_suffix Removes suffix string, suffix string
contains Checks if string contains substring string, substring boolean
replace Replaces substrings string, old, new, n string

zlib Package

Method Description Parameters Returns
compress Compresses data using zlib string string (compressed data)
decompress Decompresses zlib data string (compressed data) string, error

General Information

  • All packages are loaded through the Preload() function in preload.go
  • Methods are available in Lua as modules: crypto.md5(), encoding.hex_encode(), strings.split(), zlib.compress()
  • Decoding methods return two values: result and error (if any)
  • Encoding methods return only the result

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Preload

func Preload(L *lua.LState)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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