预览
说明
这是别人写的一个函数库,自己用着非常方便。
为了以后需要,这是我个人备份。
代码
require "lc"
print(lc.help()); -- 获得帮助
输出
Simple Characters Transformation
a2w(ansi to unicode)
u2w(utf8 to unicode)
w2a(unicode to ansi)
w2u(unicode to utf8)
u2a(utf8 to ansi)
a2u(ansi to utf8)
bstr(bytes of str)
help(show this)
wunoman@qq.com 2012/03/06
引用事例
require "lfs"
require "lc"
-- print(lc.help());
function FindFile( szPath )
for file in lfs.dir(szPath) do
if file ~= "." and file ~= ".." then
print (file)
end
end
end
print (FindFile(lc.u2a("C:\\Users\\Lenoco\\Desktop\\Lua\\常用函数")))