CreateKeyWord asp实现的由给定的字符串生成关键字的代码
2007-09-01 22:22
501 查看
'************************************************** '函数名:CreateKeyWord '作 用:由给定的字符串生成关键字 '参 数:Constr---要生成关键字的原字符串 '返回值:生成的关键字 '************************************************** Function CreateKeyWord(byval Constr,Num) If Constr="" or IsNull(Constr)=True or Constr="$False$" Then CreateKeyWord="$False$" Exit Function End If If Num="" or IsNumeric(Num)=False Then Num=2 End If Constr=Replace(Constr,CHR(32),"") Constr=Replace(Constr,CHR(9),"") Constr=Replace(Constr," ","") Constr=Replace(Constr," ","") Constr=Replace(Constr,"(","") Constr=Replace(Constr,")","") Constr=Replace(Constr,"<","") Constr=Replace(Constr,">","") Constr=Replace(Constr,"""","") Constr=Replace(Constr,"?","") Constr=Replace(Constr,"*","") Constr=Replace(Constr,"|","") Constr=Replace(Constr,",","") Constr=Replace(Constr,".","") Constr=Replace(Constr,"/","") Constr=Replace(Constr,"\","") Constr=Replace(Constr,"-","") Constr=Replace(Constr,"@","") Constr=Replace(Constr,"#","") Constr=Replace(Constr,"$","") Constr=Replace(Constr,"%","") Constr=Replace(Constr,"&","") Constr=Replace(Constr,"+","") Constr=Replace(Constr,":","") Constr=Replace(Constr,":","") Constr=Replace(Constr,"‘","") Constr=Replace(Constr,"“","") Constr=Replace(Constr,"”","") Constr=Replace(Constr,"&","") Constr=Replace(Constr,"gt;","") Dim i,ConstrTemp For i=1 To Len(Constr) ConstrTemp=ConstrTemp & "|" & Mid(Constr,i,Num) Next If Len(ConstrTemp)<254 Then ConstrTemp=ConstrTemp & "|" Else ConstrTemp=Left(ConstrTemp,254) & "|" End If ConstrTemp=left(ConstrTemp,len(ConstrTemp)-1) ConstrTemp= Right(ConstrTemp,len(ConstrTemp)-1) CreateKeyWord=ConstrTemp
相关文章推荐
- CreateKeyWord asp实现的由给定的字符串生成关键字的代码
- c#语言asp.net实现treeview控件读数据库动态生成树的代码
- ASP.NET 2.0 HttpHandler实现生成图片验证码(示例代码下载)
- asp生成和导出excel和word数据源码和代码,简单好用(已经测试可以用)
- ASP.NET 2.0 HttpHandler实现生成图片验证码(示例代码下载)
- ASP.NET 2.0 HttpHandler实现生成图片验证码(示例代码下载)
- 由给定的字符串生成关键字
- c#语言asp.net实现treeview控件读数据库动态生成树的代码
- 随机生成多语言字符串的代码实现
- Java根据word模板生成word文档之后台解析和实现及部分代码(三)E
- ASP.NET 2.0 HttpHandler实现生成图片验证码(示例代码下载)
- Asp.net Webform 使用Repository模式实现CRUD操作代码生成工具
- asp.net实现word文档在线预览功能代码
- 用php或asp实现在线生成网页桌面快捷方式的代码
- asp.net(c#) 使用Rex正则来生成字符串数组的代码
- asp.net实现word文档在线预览功能代码
- Asp.net生成静态网页的实现代码
- ASP.NET 2.0 HttpHandler实现生成图片验证码(示例代码下载)
- ASP.NET 2.0 HttpHandler实现生成图片验证码(示例代码下载)
- ASP.NET 2.0 HttpHandler实现生成图片验证码(示例代码下载)