手机
当前位置:查字典教程网 >编程开发 >ASP教程 >CreateKeyWord asp实现的由给定的字符串生成关键字的代码
CreateKeyWord asp实现的由给定的字符串生成关键字的代码
摘要:'**************************************************'函数名:CreateKeyWord'...

'**************************************************

'函数名:CreateKeyWord

'作用:由给定的字符串生成关键字

'参数:Constr---要生成关键字的原字符串

'返回值:生成的关键字

'**************************************************

FunctionCreateKeyWord(byvalConstr,Num)

IfConstr=""orIsNull(Constr)=TrueorConstr="$False$"Then

CreateKeyWord="$False$"

ExitFunction

EndIf

IfNum=""orIsNumeric(Num)=FalseThen

Num=2

EndIf

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;","")

Dimi,ConstrTemp

Fori=1ToLen(Constr)

ConstrTemp=ConstrTemp&"|"&Mid(Constr,i,Num)

Next

IfLen(ConstrTemp)<254Then

ConstrTemp=ConstrTemp&"|"

Else

ConstrTemp=Left(ConstrTemp,254)&"|"

EndIf

ConstrTemp=left(ConstrTemp,len(ConstrTemp)-1)

ConstrTemp=Right(ConstrTemp,len(ConstrTemp)-1)

CreateKeyWord=ConstrTemp

EndFunction

【CreateKeyWord asp实现的由给定的字符串生成关键字的代码】相关文章:

asp 常用的字符串处理函数

实现ASP程序执行时间统计类的代码

用ASP创建MDaemon用户的代码

asp中COM组件中如何连接数据库的代码

实现支持逻辑搜索/单词搜索/词组搜索+支持OR/AND关键字的VBS CLASS!

用asp实现无组件生成验证码的方法2种

asp实现sql的备份与恢复

asp下tag的实现,简单介绍与部分代码

判断字符串中相同字符的个数

截取实际长度字符串,并用空格替换

精品推荐
分类导航