https://github.com/chai2010/glua-strings
Go strings package for gopher-lua
https://github.com/chai2010/glua-strings
glua gopher-lua lua strings
Last synced: 10 days ago
JSON representation
Go strings package for gopher-lua
- Host: GitHub
- URL: https://github.com/chai2010/glua-strings
- Owner: chai2010
- License: mit
- Created: 2017-12-22T05:35:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-07T18:04:38.000Z (3 months ago)
- Last Synced: 2025-04-16T02:15:20.614Z (10 days ago)
- Topics: glua, gopher-lua, lua, strings
- Language: Go
- Homepage: https://godoc.org/github.com/chai2010/glua-strings
- Size: 16.6 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
- *Go语言QQ群: 102319854, 1055927514*
- *凹语言(凹读音“Wa”)(The Wa Programming Language): https://github.com/wa-lang/wa*----
# Go strings package for [gopher-lua](https://github.com/yuin/gopher-lua)
[hello.go](hello.go):
```go
package mainimport (
"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](hello.lua):
```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.