lua
osummertime
芸芸众生...
展开
-
Lua split
function split(a,b) count=0 start = 1 local arry = {} lastStart = string.find(a,b,start) if(lastStart~=nil)then count=count+1 end table.insert(arry,1,string.sub(a,st原创 2017-05-15 21:34:49 · 236 阅读 · 0 评论 -
lua 文件读写
function split(a,b) count=0 start = 1 local arry = {} lastStart = string.find(a,b,start) if(lastStart~=nil)then count=count+1 end table.insert(arry,1,string.sub(a,st原创 2017-05-16 11:07:36 · 684 阅读 · 0 评论 -
Lua中的loadfile、dofile、require详解
本来今天不应该讨论这几个函数的,不过,为了凑字数..不,为了方便以后的文章,还是要谈谈这几个基础函数的~ 1.loadfile——只编译,不运行 loadfile故名思议,它只会加载文件,编译代码,不会运行文件里的代码。 比如,我们有一个hellofile.lua文件: 复制代码 代码如下: print(“hello”); function hehe() print(“hello”); end这个文转载 2017-05-19 16:18:10 · 416 阅读 · 0 评论