Home  Contents

string.char

String Lua Commands

SYNOPSIS

string.char(···)

DESCRIPTION

Receives zero or more integers. Returns a string with length equal to the number of arguments, in which each character has the internal numerical code equal to its corresponding argument.

NOTES

Note that numerical codes are not necessarily portable across platforms.

This function has been modified compared to the generic Lua. It will happily accept values outside the range of 0...255 without reporting an error. All values are implicitly truncated to eight bits.

RETURN VALUE

Returns a string.

EXAMPLE

print(string.char(67,111,114,101,52))
Core4