主页 > 知识库 > CreateKeyWord asp实现的由给定的字符串生成关键字的代码

CreateKeyWord asp实现的由给定的字符串生成关键字的代码

热门标签:团购网站 阿里云 科大讯飞语音识别系统 服务器配置 银行业务 Linux服务器 电子围栏 Mysql连接数设置
'**************************************************
'函数名: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,"nbsp;","")
   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
End Function

标签:江苏 广元 枣庄 萍乡 蚌埠 衢州 大理 衡水

巨人网络通讯声明:本文标题《CreateKeyWord asp实现的由给定的字符串生成关键字的代码》,本文关键词  ;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 收缩
    • 微信客服
    • 微信二维码
    • 电话咨询

    • 400-1100-266