永洪社区

标题: 函数怎么写 [打印本页]

作者: 小白福在加油    时间: 2024-6-17 14:05
标题: 函数怎么写
返回字符串STRING除去前N个字符后所生成的新字符串


作者: 哈莉·奎茵    时间: 2024-6-17 14:12
  1. str = "AA1232456789";
  2. n=5
  3. lastPart = str.substring(n,100);
  4. debug(lastPart)
复制代码

作者: 小白福在加油    时间: 2024-6-17 14:13
yhdata_roWRDCAN 发表于 2024-6-17 14:12

你这个是代码,有没有函数怎么写
作者: 哈莉·奎茵    时间: 2024-6-17 14:15
100不够你可以1000(野生的程序员不需要长度),如果真的不确定可以用一下 str.lenght 求字符串固定长度
作者: yhdata_lyaa    时间: 2024-6-17 14:17
参考mid函数
mid("calculation", 2) = "alculation"

mid("calculation", 2, 5) ="alcul"
作者: 哈莉·奎茵    时间: 2024-6-17 14:20
小白福在加油 发表于 2024-6-17 14:13
你这个是代码,有没有函数怎么写

额,自己改写成一个js function 不难的哈,动手一下




欢迎光临 永洪社区 (http://club.yonghongtech.com/) Powered by Discuz! X3.4