最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp中join函数实现字符串连接
时间:2022-06-29 13:46:44 编辑:袖梨 来源:一聚教程网
(list[,delimiter])
参数 描述
list Required. A one-dimensional array that contains the substrings to be joined
必选项。包含要联接的子字符串一维数组。
delimiter Optional. The character(s) used to separate the substrings in the returned string. Default is the space character
可选项。在返回字符串中用于分隔子字符串的字符。如果省略,将使用空字符 ("")。 如果 delimiter 是零长度字符串,则在同一列表中列出全部项,没有分界符。
实例 1
代码如下 | 复制代码 |
dim a(5),b a(0)="Saturday" a(1)="Sunday" a(2)="Monday" a(3)="Tuesday" a(4)="Wednesday" b=Filter(a,"n") document.write(join(b)) 输出:Sunday Monday Wednesday |
实例,测试效率
代码如下 | 复制代码 |
<% Dim a(10000),i,t t=Timer For i=0 to 10000 a(i)=CStr(i) Next Response.Write Join(a,vbCrLf) Response.Write timer-t Erase a %> |
速度可以和php一拼(虽然还是没有他快),
另一种用法是
代码如下 | 复制代码 |
s=Join(Array("1","2","3",.....,"9999")) |
速度依然比"1" & "2" & "3" & .....& "9999"要快很多
相关文章
- 《奇迹暖暖》捞星星的女孩快速获取指南 08-02
- 《极无双2》常驻活动推荐玩法攻略 08-02
- 《碧蓝航线》海伦娜·META技能有哪些效果 08-02
- 好玩的竖屏手游2022推荐 08-02
- 《创造与魔法》希腊恋人服装获取条件说明 08-02
- 《炉石传说》特殊嫌疑任务攻略 08-02