Categorygithub.com/chai2010/glua-strings
modulepackage
0.0.0-20250207180437-ffacd86c1693
Repository: https://github.com/chai2010/glua-strings.git
Documentation: pkg.go.dev

# README


Go strings package for gopher-lua

hello.go:

package main

import (
	"github.com/yuin/gopher-lua"

	strings "github.com/chai2010/glua-strings"
)

func main() {
	L := lua.NewState()
	defer L.Close()

	strings.Preload(L)

	if err := L.DoString(code); err != nil {
		panic(err)
	}
}

hello.lua:

local strings = require("strings")

print(strings.ToUpper("abc"))

for i, s in ipairs(strings.Split("aa,b,,c", ",")) do
	print(i, s)
end

Run example:

$ go run hello.go

License

The MIT License.

# Functions

No description provided by the author
No description provided by the author