LotusScript lifting Large string concatenation functions (functions similar to StringBuffer in Java)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.