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

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

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

函数方法

num = string.len(str)

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

函数用例

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

results matching ""

    No results matching ""