2012年5月7日

摘要: string 若要将一个数字转换成字符串,可以调用函数tostring,或者将该数字与一个空字符串相连接: print(tostring(10)=="10") --->true print(10 .. "" == "10")--->true 在Lua 5.1 中,可以在字符串前放置操作符“#” 来获得该字符串的长度: a="hello" print(#a) --> 5 print(#"good\0bye") -->8 function(函数) Lua 既可以调用以自身Lu 阅读全文
posted @ 2012-05-07 23:29 沙漠之泉 阅读(205) 评论(0) 推荐(0) 编辑

导航