LuaNET, the lua 5.1 api documentation!

Lua-Api

String

[LUA 5.1] string.char

function string.char ( ... )
Receives zero or more integers and 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.

Code
print(string.char(65,66,67)) -- ABC
print(string.char(76,117,97)) -- Lua
print(string.char()) -- "" (empty string)


Note: Numerical codes are not necessarily portable across platforms.

See the function string.byte for decoding strings to its internal numerical code.

Comments

© 2007 DracoBlue :: Valid XHTML, CSS, RSS Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC | SourceNet © 2007, DracoBlue :: Page created in 0.244 seconds with 28 queries.