![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
lua
明珠师兄
我是一个文艺的程序员。
展开
-
lua拼接字符串速度比较
【代码】lua拼接字符串速度比较。原创 2022-12-16 09:37:48 · 332 阅读 · 0 评论 -
lua原表的使用
local extFunc = { add = function(tb, arg2) print(tb) print(arg2) end}local a = { __tostring = function(tb) return "a" end}local b = { __mode = "kv", __index = function(tb, key) print(tb) .原创 2022-01-12 19:39:07 · 1889 阅读 · 0 评论 -
lua 检测中文、数字、字母
--检测中文、数字、字母function CheckNickName(s) local ss = {} for k = 1, #s do local c = string.byte(s,k) if not c then break end if (c>=48 and c<=57) or (c>= 65 and c<=90) or (c>=97 and c<=122) then ss[#ss+1] = string.char(c.原创 2020-11-30 14:17:40 · 2356 阅读 · 0 评论 -
lua “2020-09-10 00:00:01“ 转时间戳
local str = "2020-09-10 00:00:01" local pattern = "(%d+)-(%d+)-(%d+) (%d+):(%d+):(%d+)"local y, mon, d, h, min, s = str:match(pattern)local timeChu = os.time({day=d, month=mon, year=y, hour=h, minute=min, second=s})原创 2020-10-13 15:25:39 · 512 阅读 · 0 评论