Operate v0.1.0-beta.6 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

Extends the given VM state, returning the modified state.

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

Extends the given VM state, returning the modified state.

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.