Documentation ¶
Index ¶
- Variables
- func Format(t *rt.Thread, format string, values []rt.Value) (string, error)
- func PackSize(format string) (uint, error)
- func PackValues(format string, values []rt.Value, budget uint64) (string, uint64, error)
- func UnpackString(format, pack string, j int, budget uint64) (vals []rt.Value, nextPos int, used uint64, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var LibLoader = packagelib.Loader{
Load: load,
Name: "string",
}
LibLoader specifies how to load the string lib
Functions ¶
func Format ¶
Format is the base for the implementation of lua string.format()
It works by scanning the verbs in the format string and converting the argument corresponding to this verb to the correct type, then calling Go's fmt.Sprintf().
It temporarily requires all the memory needed to store the formatted string, but releases it before returning so the caller should require memory first thing after the call.
func PackValues ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.