Operate v0.1.0-beta.15 Operate.VM.Extension.String View Source

Extends the VM state with implementations of Lua's string.pack and string.unpack functions.

Link to this section Summary

Functions

Callback implementation for Operate.VM.Extension.extend/1.

Packs the given values into a binary using the specified format.

Unpacks the given binary string into a list of values using the specified format. Returns a list, the final element being the index of the next unread byte.

Link to this section Functions

Callback implementation for Operate.VM.Extension.extend/1.

Packs the given values into a binary using the specified format.

Link to this function

unpack(fmt, value, n \\ 1)

View Source

Unpacks the given binary string into a list of values using the specified format. Returns a list, the final element being the index of the next unread byte.