主頁 > 知識庫 > 如何實現(xiàn)非大小寫的替換?

如何實現(xiàn)非大小寫的替換?

熱門標(biāo)簽:呼叫中心市場需求 檢查注冊表項 美圖手機 鐵路電話系統(tǒng) 銀行業(yè)務(wù) 服務(wù)器配置 網(wǎng)站文章發(fā)布 智能手機

如何實現(xiàn)非大小寫的替換?

Function ReplaceNoIgnoreCase(str,replStr)

      If len(replStr)1 or str="" Then
            ReplaceTest=str
            Exit function
      End If

      Dim LoopN
      LoopN=1

      Dim TmpStr,inStrN,LenreplStr,Ustr,UreplStr
      LenreplStr = Len(replStr)
      TmpStr = str
      Ustr = Ucase(str)
      UreplStr = Ucase(replStr)
      str=""

      inStrN = inStr(Ustr,UreplStr)     

      Do While inStrN>0 and TmpStr>""
            LoopN = LoopN+1
            If LoopN>10 Then Exit Function
            str=str Left(TmpStr,inStrN-1)
            TmpStr = Mid(TmpStr,inStrN)
            UStr = Mid(UStr,inStrN)
            str=str "font color=ff0000>" Left(TmpStr,LenreplStr) "/font>"
            TmpStr = Mid(TmpStr,LenreplStr+1)
            UStr = Mid(UStr,LenreplStr+1)
            inStrN = inStr(Ustr,UreplStr)
            If inStrN1 Then str=strTmpStr
      Loop
      ReplaceTest = str

End Function

Response.Write "p>result:"ReplaceNoIgnoreCase("Flying Happy in the Sun ")

標(biāo)簽:沈陽 樂山 上海 河南 長治 紅河 新疆 滄州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《如何實現(xiàn)非大小寫的替換?》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266