local str = "abc" local len = #str print(len) -- 3 str = "你们好" ... 总之,在lua中,通过string.len获取的字符串的字节长度,采用utf-8存储的。
確定! 回上一頁