LotusScript lifting Large string concatenation functions (functionally similar to StringBuffer in Java), the code is as follows:
Class stringbuffer public count As Integer Private arr () as String private size As Integer Private increment As Integer Sub New (Byval A As Integer) Redim arr (a) in Crement=a count=0 End Sub Sub Add (Byval A as String) Me.push a End Sub Sub Push (Byval A as String) Size=ubound (arr ()) If Count>=s Ize then Redim Preserve arr (size+increment) End If arr (count) =a Count=count+1 End Sub Function collapse (Byval A As String) as String Dim ST EMP as String If count>0 then Redim Preserve arr (count-1) Stemp=join (arr, a) End If Collapse=stemp End Function function GetArray () as Variant If count>0 then Redim Preserve arr (count-1) Else Redim arr (0) End If Getarray=arr End Function function clear Count=0 End FunctionEnd Class
LotusScript lifting Large string concatenation functions (functions similar to StringBuffer in Java)