Regular API function

simUnpackUInt16Table

Description Unpacks a string (or part of it) into a table of uint16 numbers. See also simPackUInt16Table and the other packing/unpacking functions.
C synopsis -
C parameters
-
C return value
-
Lua synopsis table uint16Numbers=simUnpackUInt16Table(string data,number starUint16Index=0,number uint16Count=0,number additionalByteOffset)
Lua parameters
data: a string (values between 0 and 255) that contains packed uint16 numbers
starUint16Index: the zero-based index from which on data should be unpacked (from data[2*starUint16Index+1+additionalByteOffset]). Can be omitted in which case 0 is used.
uint16Count: the amount of uint16s that should be unpacked. Can be omitted in which case 0 is used (which indicates that the maximum of uint16s should be unpacked from the indicated starUint16Index).
additionalByteOffset: a byte offset that will be added before reading the uint16s. Can be omitted, in which case 0 is used.
Lua return values
uint16Numbers: a table containing unpacked uint16 numbers if operation was successful, nil otherwise

All regular API functions on one page