不用组件来实现StrCat函数的功能

2016-01-29 18:16 4 1 收藏

不用组件来实现StrCat函数的功能,不用组件来实现StrCat函数的功能

【 tulaoshi.com - ASP 】

  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

来源:https://www.tulaoshi.com/n/20160129/1505099.html

延伸阅读
标签: ASP
  w3Sockets是写著名JMAIL邮件组件开发者开发的又一免费实用的ASP组件。 需要下载的朋友可以在这里下载: http://www.dimac.net/FreeDownloads/dlstart.asp?ProductID=2 下载后解压,运行SocketReg.exe注册组件。 这里主要介绍如何用该组件WHOIS域名,目前网上很多域名查询系统都是通过XMLHTTP获得其他网页数据,而获得记录。其实,我...
标签: ASP
  <% sub Jmail(email) Dim JMail,SendMail Set JMail=Server.CreateObject("JMail.SMTPMail") JMail.Logging=True JMail.Charset="gb2312" JMail.ContentType = "text/html" JMail.ServerAddress=SMTPServer JMail.Sender=SystemEmail JMail.Subject=topic JMail.Body=mailbody JMail.AddRecipient email JMail.Priority...
代码如下: #include "stdafx.h" #includeiostream using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char s1[60]="kingbaby"; char *s2="hello"; int i=0;int j=0; while(s1[i]!='\0')i++; while((s1[i]=s2[j])!='\0'){ j++;i++; } couts1endl; return 0; } 方法二 代码如下: #include "stdafx.h" #incl...
标签: Web开发
函数名称 函数功能 Cbool(string) 转换为布尔值 Cbyte(string) 转换为字节类型的值 Ccur(string) 转换为货币类值 Cdate(string) 转换为日前类型的值 Cdbl(string) 转换为双精度值 Cint(string) 转换为整数值 Clng(string) 转换为长整型的值 Csng(string) 转换为单精度的值 Cstr(var) 转换为字符串值 Str(var) 数值转换为字符串 Val(string) 字符...
代码如下: #includeiostream  #include assert.h  using namespace std;  void myStrcpy(char* Dest, const char *Src)  {      assert((Dest!= NULL)&&(Src!=NULL));      while((*Dest = *Src)!='\0')      {        ...

经验教程

260

收藏

73
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部