<%
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
'快速字串連接類
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
'名稱: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
%>