zoukankan      html  css  js  c++  java
  • 把一句话拆解成多关键字的函数

    '作 用:由给定的字符串生成关键字
    '参 数:Constr---要生成关键字的原字符串;Num---每个关键字的字符数
    '返回值:生成的关键字
    '**************************************************
    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
        If Left(ConstrTemp,1)="," Then ConstrTemp=Right(ConstrTemp,Len(ConstrTemp)-1)
        If Right(ConstrTemp,1)="," Then ConstrTemp=Left(ConstrTemp,Len(ConstrTemp)-1)
        CreateKeyWord=ConstrTemp
    End Function
  • 相关阅读:
    Ubuntu下Nginx与Apache2修改默认端口号
    Kerbernetes的Pod资源管理进阶
    Kerbernetes的Pod资源管理
    Kerbernetes的Pod资源清单配置基础
    kubernetes快速入门
    K8S镜像下载报错解决方案(使用阿里云镜像去下载kubeadm需要的镜像文件)
    CentOS 7.6使用kubeadm部署k8s 1.17.2测试集群实战篇
    8
    7
    6
  • 原文地址:https://www.cnblogs.com/see7di/p/2239985.html
Copyright © 2011-2022 走看看