-- 遍历所有字符编码并转换为字符local chars = for i = 65 90 do local char = stringchari if char ~= i then printchar tableinsertchars char else tableinsertchars char endend输出结果是ABCDEFGHI
可以直接使用字符串拼接的方式,在每个字符后面加上"HS74",例如:
local chars = {}
for i = 65, 90 do
local char = string.char(i)
if char ~= i then print(char)
table.insert(chars, char.."HS74")
else
table.insert(chars, char.."HS74")
end
end
这样输出的结果就变成了:
AHS74 BHS74 CHS74 DHS74 EHS74 FHS74 GHS74 HHS74 IHS74 JHS74 KHS74 LHS74 MHS74 NHS74 OHS74 PHS74 QHS74 RHS74 SHS74 THS74 UHS74 VHS74 WHS74 XHS74 YHS74 ZHS74
原文地址: https://www.cveoy.top/t/topic/btwu 著作权归作者所有。请勿转载和采集!