标签: lua

1 篇文章

Lua 计算字符串的实际宽度
function GetStringLen(pzStr) local result = 0 for i=1,#pzStr do local curByte = string.byte(pzStr, i) local byteCount = 1; if curByte>0 and curByte<=127 then byteCount = 1 …