gluautf8

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: 0BSD Imports: 3 Imported by: 0

README

utf8 for gopher-lua

Implements Lua 5.3 utf8 for gopher-lua. To use, call

import (
	"github.com/PeerDB-io/gluautf8"
)

// add so that `local utf8 = require("utf8")` works
L.PreloadModule("utf8", gluautf8.Loader)

// or add to global env
L.Push(ls.NewFunction(gluautf8.Loader))
L.Call(0, 1)
L.Env.RawSetString("utf8", L.Get(-1))
L.Pop(1)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Utf8charpattern = lua.LString([]byte{
	'[', 0, '-', 0x7f, 0xc2, '-', 0xf4, ']',
	'[', 0x80, '-', 0xbf, ']', '*',
})

Functions

func Loader

func Loader(ls *lua.LState) int

func Utf8char

func Utf8char(ls *lua.LState) int

func Utf8codepoint

func Utf8codepoint(ls *lua.LState) int

func Utf8codes

func Utf8codes(ls *lua.LState) int

func Utf8len

func Utf8len(ls *lua.LState) int

func Utf8offset

func Utf8offset(ls *lua.LState) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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