<%
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
'快速字符串連接類
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
'名稱:Class_FastString
'來源:'授權:免費使用
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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
%>
新聞熱點
疑難解答