Home Contents | # string.hexdump | String | Core4 Lua Commands

## SYNOPSIS

result = string.hexdump(data)

## DESCRIPTION

Returns a string which contains a hexadecimal dump of the contents of data.

## RETURN VALUE

String, ASCII text.

## ERRORS

Passed data must be a string or a number, or else an error is thrown.

## NOTES

This function is meant mainly for debugging purposes.

## BUGS

Should call tostring() on non-string data.

## EXAMPLE

>
print(string.hexdump("This is some text"))
00000000: 54 68 69 73 20 69 73 20 73 6F 6D 65 20 74 65 78 This is some tex 00000010: 74 t

## SEE ALSO

string.fromhex, string.tohex, string.from64, string.to64