作家
登录

由给定的字符串生成关键字

作者: 来源:www.28hudong.com 2013-03-30 08:57:54 阅读 我要评论

'函数名: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,"”","") 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 CreateKeyWord=ConstrTemp End Function

  推荐阅读

  经典的分页完整程序+注释

在前面我们已经给大家讲了分页程序,在这里再给大家提供一个,分析一下也许有新的收获. 复制代码 代码如下:<% '以下程序是我的网站中的编程技术文章系统的部分代码,着重突出分页,因此其他无用代码被清除,您可修改后应>>>详细阅读


本文标题:由给定的字符串生成关键字

地址:http://www.17bianji.com/kaifa2/ASP/33051.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)