当前位置: 首页 > 图文教程 > 网络编程 > ASP > 一个asp快速字符串连接类

ASP
ASP编程中15个非常有用的例子 (二)
ASP与JSP的比较(一)
ASP与JSP的比较(二)
ASP中五种连接数据库的方法
从ASP调用SQL中的图像
用排序串字段实现树状结构(例程:连接字串)
用排序串字段实现树状结构(例程:删除贴子)
用排序串字段实现树状结构(例程:回复表单)
用排序串字段实现树状结构(例程:显示贴子内容)
用排序串字段实现树状结构(例程:显示树)
用排序串字段实现树状结构(存储过程)
用排序串字段实现树状结构(库结构)
用排序串字段实现树状结构(原理)
remote script文档(转载自微软)(一)
remote script文档(转载自微软)(二)
remote script文档(转载自微软)(三)
remote script文档(转载自微软)(四)
remote script文档(转载自微软)(五)
remote script文档(转载自微软)(六)
remote script文档(转载自微软)(七)

ASP 中的 一个asp快速字符串连接类


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 225 ::
收藏到网摘: n/a

<%
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
'快速字符串连接类
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
'名称:Class_FastString
'来源:http://www.jansfreeware.com
'整理:qihangnet
'更新:2005年6月15日
'作用:高效地进行字符串连接,比 str = str & "abc"的方法快很多
'授权:免费使用
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Class Class_FastString
'************************************
'变量定义
'************************************
'index --- 字符串数组的下标
'ub ------ 用于调整数组度数的整数变量
'ar() ---- 字符串数组
Private index, ub, ar()
'************************************
'实例 初始化/终止
'************************************
Private Sub Class_Initialize()
Redim ar(50)
index = 0
ub = 49
End Sub
Private Sub Class_Terminate()
Erase ar
End Sub
'************************************
'事件
'************************************
'默认事件,添加字符串
Public Default Sub Add(value)
ar(index) = value
index = index+1
If index>ub Then
ub = ub + 50
Redim Preserve ar(ub)
End if
End Sub
'************************************
'方法
'************************************
'返回连接后的字符串
Public Function Dump
Redim preserve ar(index-1)
Dump = join(ar,"") '关键所在哦^_^
End Function
End class
%>