函数:string.byte 字符串转 ASCII 编码

函数名称:字符串转 ASCII 编码

函数功能:将字符串进行 ASCII 编码

函数方法

num1,num2,num3,.. = string.byte(str.i,j)

参数 类型 必填 说明
str string 需要进行编码的字符串
i number 截取起点,不写默认值为 1
j number 截取终点,不写默认值为 i
返回值 类型 说明
num number/nil 编码后的字符串

函数用例

num1,num2,num3=string.byte("ceshi",1,3)
dialog(num1.."\r\n"..num2.."\r\n"..num3,5)
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""