ASP将两个数组合并为一个数组函数 array_merge()
2009-05-04 10:40:31 来源:WEB开发网<%
' Copyright (c) 2009, reusablecode.blogspot.com; some rights reserved.
'
' This work is licensed under the Creative Commons Attribution License. To view
' a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or
' send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
' 94305, USA.
' Merge two arrays into one.
function array_merge(byVal firstArray, byVal secondArray)
dim totalSize
dim i
dim combinedArray
' Ensure that we're dealing with arrays.
if not isArray(firstArray) then
firstArray = Array(firstArray)
end if
if not isArray(secondArray) then
secondArray = Array(secondArray)
end if
' Set up the new array.
totalSize = uBound(firstArray) + uBound(secondArray) + 1
combinedArray = firstArray
redim PReserve combinedArray(totalSize)
for i = 0 to uBound(secondArray)
combinedArray(uBound(firstArray) + 1 + i) = secondArray(i)
next
array_merge = combinedArray
end function
%>
- ››asp.net页面弄成伪静态页面
- ››Asp.net 中将汉字转换成拼音的方法
- ››ASP.NET及JS中的cookie基本用法
- ››ASP.NET获取MS SQL Server安装实例
- ››asp.net实现调用百度pai 在线翻译英文转中文
- ››ASP.NET页面选项进行提示判断
- ››Asp.net定时执行程序
- ››ASP.NET中利用DataList实现图片无缝滚动
- ››ASP.NET验证控件RequiredFieldValidator
- ››ASP.NET中使用System.Net.Mail发邮件
- ››ASP.NET中获取用户控件中控件的ID
- ››ASP.NET中FileBytes写成文件并存档
更多精彩
赞助商链接