a = {"1","2","3"} b = "456" c = {} d = {} for i=1,#a do c[i] = tostring(a[i]) end d[1]= tostring(string.sub(1,1)) d[2]= tostring(string.sub(2,-2)) d[3]= tostring(string.sub(3,-1)) 字符串是数组形式或者变量形式分别用我写的代码去实现,我验证了的
回答于 2018-09-03 11:25