最新下载
热门教程
- 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"要快很多
相关文章
- 城门血战 全新策略肉鸽塔防游戏试玩 07-30
- 城门血战:肉鸽塔防新体验 07-30
- 城门血战游戏介绍 塔防缝合自走棋 07-30
- 城门血战试玩实况 塔防玩家狂喜 07-30
- 城门血战肉鸽塔防新游试玩 07-30
- 城门血战 试玩 塔防守家+肉鸽游戏 07-30