gluarunes

package module
v0.0.0-...-2b3cdcb Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 4 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToRune

func BytesToRune(L *lua.LState) int

BytesToRune converts UTF-8 bytes to a rune. Takes a table of bytes and returns the corresponding rune value as a lua.LNumber, or nil if the bytes are not valid UTF-8.

func BytesToString

func BytesToString(L *lua.LState) int

BytesToString converts UTF-8 bytes to a string. Takes a table of bytes and returns the corresponding string as a lua.LString.

func ContainsRune

func ContainsRune(L *lua.LState) int

ContainsRune checks if a rune exists in a string. Parameters:

  • string: The input string to search
  • rune: The rune to search for

Returns a boolean as lua.LBool indicating whether the rune exists in the string.

func IsControl

func IsControl(L *lua.LState) int

IsControl checks if a rune is a Unicode control character. Takes a rune value as an integer and returns a boolean as lua.LBool.

func IsDigit

func IsDigit(L *lua.LState) int

IsDigit checks if a rune is a Unicode decimal digit. Takes a rune value as an integer and returns a boolean as lua.LBool.

func IsGraphic

func IsGraphic(L *lua.LState) int

IsGraphic checks if a rune is graphic. Takes a rune value as an integer and returns a boolean as lua.LBool. Graphic characters include letters, marks, numbers, punctuation, symbols, but not spaces or control characters.

func IsInRange

func IsInRange(L *lua.LState) int

IsInRange checks if a rune is within a specified range. Parameters:

  • rune: The rune to check
  • lo: The lower bound of the range (inclusive)
  • hi: The upper bound of the range (inclusive)

Returns a boolean as lua.LBool indicating whether the rune is within the range.

func IsLetter

func IsLetter(L *lua.LState) int

IsLetter checks if a rune is a Unicode letter. Takes a rune value as an integer and returns a boolean as lua.LBool.

func IsLower

func IsLower(L *lua.LState) int

IsLower checks if a rune is a lowercase letter. Takes a rune value as an integer and returns a boolean as lua.LBool.

func IsMark

func IsMark(L *lua.LState) int

IsMark checks if a rune is a Unicode mark character. Takes a rune value as an integer and returns a boolean as lua.LBool.

func IsNumber

func IsNumber(L *lua.LState) int

IsNumber checks if a rune is a Unicode number (includes characters besides 0-9). Takes a rune value as an integer and returns a boolean as lua.LBool.

func IsPrint

func IsPrint(L *lua.LState) int

IsPrint checks if a rune is printable. Takes a rune value as an integer and returns a boolean as lua.LBool. Printable characters include letters, marks, numbers, punctuation, symbols, and spaces, but not control characters.

func IsPunct

func IsPunct(L *lua.LState) int

IsPunct checks if a rune is a Unicode punctuation character. Takes a rune value as an integer and returns a boolean as lua.LBool.

func IsSpace

func IsSpace(L *lua.LState) int

IsSpace checks if a rune is a Unicode white space character. Takes a rune value as an integer and returns a boolean as lua.LBool.

func IsSymbol

func IsSymbol(L *lua.LState) int

IsSymbol checks if a rune is a Unicode symbol character. Takes a rune value as an integer and returns a boolean as lua.LBool.

func IsTitle

func IsTitle(L *lua.LState) int

IsTitle checks if a rune is a Unicode title case letter. Takes a rune value as an integer and returns a boolean as lua.LBool.

func IsUpper

func IsUpper(L *lua.LState) int

IsUpper checks if a rune is an uppercase letter. Takes a rune value as an integer and returns a boolean as lua.LBool.

func IsValidUTF8

func IsValidUTF8(L *lua.LState) int

IsValidUTF8 checks if a string contains valid UTF-8 encoding. Takes a string argument and returns a boolean indicating whether the string is valid UTF-8 as a lua.LBool.

func Loader

func Loader(L *lua.LState) int

Loader is the module loader function for the runes package. It creates a new table and populates it with the package's functions.

func Preload

func Preload(L *lua.LState)

Preload registers the runes package loader function. It should be called during Lua state initialization to make the package available.

func ReverseRunes

func ReverseRunes(L *lua.LState) int

ReverseRunes reverses the runes in a string. Takes a string argument and returns a new string with the runes in reverse order as a lua.LString.

func RuneAt

func RuneAt(L *lua.LState) int

RuneAt returns the rune at a specific byte position in a string. Parameters:

  • string: The input string
  • position: The 1-based index of the desired rune

Returns nil if the position is invalid or the rune is not valid UTF-8, otherwise returns the rune value as a lua.LNumber.

func RuneCount

func RuneCount(L *lua.LState) int

RuneCount returns the number of runes in a string. Takes a string argument and returns the count of Unicode code points in that string as a lua.LNumber.

func RuneIndex

func RuneIndex(L *lua.LState) int

RuneIndex finds the first occurrence of a rune in a string. Parameters:

  • string: The input string to search
  • rune: The rune to search for
  • start: Optional 1-based starting position (defaults to 1)

Returns the 1-based index of the first occurrence as lua.LNumber, or nil if the rune is not found.

func RuneRange

func RuneRange(L *lua.LState) int

RuneRange extracts a substring by rune indices. Parameters:

  • string: The input string
  • start: Optional 1-based start index (defaults to 1)
  • end: Optional 1-based end index (defaults to -1, meaning end of string)

Returns the substring as lua.LString.

func RuneSlice

func RuneSlice(L *lua.LState) int

RuneSlice converts a string to a slice of rune values. Takes a string argument and returns a Lua table containing the numeric values of each rune in the string.

func RuneSplit

func RuneSplit(L *lua.LState) int

RuneSplit splits a string on a specified rune delimiter. Parameters:

  • string: The input string to split
  • separator: The rune to use as the delimiter

Returns a Lua table containing the resulting substrings.

func RuneString

func RuneString(L *lua.LState) int

RuneString converts a slice of integers to a string of runes. Each integer argument is converted to a rune and concatenated into a string. Returns the resulting string as a lua.LString.

func RuneToBytes

func RuneToBytes(L *lua.LState) int

RuneToBytes converts a table of runes to their UTF-8 byte representation. Takes a table of rune values as integers and returns a Lua table containing the UTF-8 bytes of all runes concatenated together.

func RuneWidth

func RuneWidth(L *lua.LState) int

RuneWidth returns the number of bytes needed to encode a rune. Takes a rune value as an integer and returns its UTF-8 encoding width as a lua.LNumber, or nil if the rune is invalid.

func StringToBytes

func StringToBytes(L *lua.LState) int

StringToBytes converts a string to its UTF-8 byte representation. Takes a string and returns a Lua table containing the UTF-8 bytes.

func ToLower

func ToLower(L *lua.LState) int

ToLower converts a rune to lowercase. Takes a rune value as an integer and returns the lowercase version as lua.LNumber.

func ToTitle

func ToTitle(L *lua.LState) int

ToTitle converts a rune to title case. Takes a rune value as an integer and returns the title case version as lua.LNumber.

func ToUpper

func ToUpper(L *lua.LState) int

ToUpper converts a rune to uppercase. Takes a rune value as an integer and returns the uppercase version as lua.LNumber.

func ValidRune

func ValidRune(L *lua.LState) int

ValidRune checks if an integer is a valid Unicode code point. Takes an integer value and returns a boolean as lua.LBool indicating whether it represents a valid Unicode code point.

Types

This section is empty.

Jump to

Keyboard shortcuts

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