programming-examples/asp/Strings/CStrCat.asp

28 lines
605 B
Plaintext
Raw Normal View History

2019-11-18 14:25:58 +01:00
<%
Class CStrCat //v1.1
Private i,sa()
Public Property Get Value
ReDim preserve sa(i)
Value=Join(sa,"")
End Property
Private Sub Class_Initialize()
i=CLng(0)
ReDim sa(500)
End Sub
Private Sub class_terminate()
Erase sa
End Sub
Public Function Add(ps)
If Len(ps)=0 Then Exit Function
If (i>=UBound(sa)) Then upsize
sa(i)=ps
i=i+1
End Function
Private Sub upsize()
Dim u
u=UBound(sa)
ReDim preserve sa(CLng(u+u*0.1))
End Sub
End Class
%>