Home  Contents

mtd16:toData

Mtd16 Core4 Lua Commands

SYNOPSIS

text = msg:toData()

DESCRIPTION

Converts the contents of msg into it's binary representation. The binary representation can be decoded again by calling mtd16.fromData().

RETURN VALUE

A string containing binary data.

EXAMPLE

>  >  >  > 
mtd16.lutTag = { Test = 0xF00F, Fnord = 0x3001 } msg = mtd16.new("Test") msg:append("Fnord", "xyzzy") print(msg:toData():hexdump())
00000000: 0B 00 0F F0 07 00 01 30 78 79 7A 7A 79 .......0xyzzy

SEE ALSO