函数:string.len 获取字符串长度

函数名称:获取字符串长度

函数功能:获取字符串长度

函数方法

num = string.len(str)

参数 类型 必填 说明
str string 需要计算的字符串
返回值 类型 说明
num number/nil 字符串长度

函数用例

str="JUST DO IT"
num = string.len(str)
dialog("字符串长度:"..num)
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""