麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 學院 > 開發設計 > 正文

不用組件來實現StrCat函數的功能

2019-11-18 21:35:40
字體:
來源:轉載
供稿:網友
really really slow by nature. This sample code uses classes to speed up the PRocess by ten times. Someone recentally came up with a DLL to do this but not all of us can install a DLL on our ISP's web servers so I wrote this easy to use VB Class for handling string concatenation.

code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!


Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for langauges that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame.
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.  


    '**************************************
    ' Name: StrCat - Non DLL version
    ' Description:asp's ability to concatena
    '     ting many strings together is really rea
    '     lly slow by nature. This sample code use
    '     s classes to speed up the process by ten
    '     times. Someone recentally came up with a
    '     DLL to do this but not all of us can ins
    '     tall a DLL on our ISP's web servers so I
    '     wrote this easy to use VB Class for hand
    '     ling string concatenation.
    ' By: Kevin Pirkl
    '
    ' Inputs:Public Property Length - To res
    '     ize the string length. To use it a secon
    '     d time on another string just set the .L
    '     ength property to another value or just
    '     dereference the object and recreate it.
    Public Method Add - too add data to the concatenated string.
    '
    ' Assumes:Didnt do much testing except u
    '     sing it to add together a string of 100,
    '     000 characters and it took about 7 secon
    '     ds which is not bad. If you need to add
    '     together more than that dont use this. I
    '     f your catting char strings like "<TR
    '     >" + whatever then it should be ok.
    '
    'This code is copyrighted and has    ' limited warranties.Please see http://w
    '     ww.Planet-Source-Code.com/xq/ASP/txtCode
    '     Id.6342/lngWId.4/qx/vb/scripts/ShowCode.
    '     htm    'for details.    '**************************************
    
    Set X = New strCat' Create an instance of strCat
    X.Length = 100001' Change from the default String length of 100,000
    str = ""
    For I = 1 To X.Length
     X.Add("A") '- takes 7 seconds on my computer
     'str = str & "A"'- takes 1 minute 7 seconds on my computer
    Next
    msgBox(Len(X.Value))
    X.Length = 101
    For I = 1 To X.Length
     X.Add("B")
    Next
    msgBox(Len(X.Value))
    Set X = Nothing ' Destroy the instance.
    msgBox("Done")
    Class strCat
     Private IntCntr
     Private strArray()
     Private intLength
     Public Property Get Length
     Length = intLength
     End Property
     Public Property Let Length( ByVal intLen)
     intLength = intLen
     IntCntr = 0
     Redim strArray(1)
     strArray(0) = ""
     Redim strArray(intLength)
     End Property
     Public Property Get Value
     Value = Join( strArray,"")
     End Property
     Private Sub Class_Initialize()
     IntCntr = 0
     Length = 100000
     End Sub
     Public Function Add( strToAdd)
     strArray(IntCntr) = strToAdd
     IntCntr= IntCntr + 1
     End Function
    End Class


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 国产亚洲精品久久久久久久 | 看片一区二区三区 | 美女污污视频在线观看 | 欧美成人一区免费视频 | 色综合激情 | 日本精品二区 | 国产精品免费久久久 | 性爱视频在线免费 | 欧美h版电影在线观看 | 欧美1| 中文字幕精品久久 | 日本在线免费观看视频 | 一区小视频 | 国产中文99视频在线观看 | 色无极影院亚洲 | 九九热这里只有精品8 | 毛片福利| 毛片大全免费看 | 91久久精品国产亚洲 | 欧美成人精品欧美一级乱黄 | 久久久久久中文字幕 | 久久无| 免费观看亚洲视频 | 国产成人精品免费视频大全最热 | 国产精品热| 亚洲国产一区二区三区 | 精品国产一区二区三区久久久蜜月 | 亚洲视频观看 | 亚洲一区二区三区在线看 | 欧美日韩在线播放 | 日韩毛片一区二区三区 | 精品国产视频一区二区三区 | 久久久久国产精品久久久久 | 色网站综合 | 97久色 | 羞羞视频免费网站男男 | 国产乱淫a∨片免费视频 | 精品国产一区二区三区四区阿崩 | 久久精品国产一区二区电影 | 操毛片 | 欧美a久久|