Advertisement
ASP_Volume2 Miscellaneous #36282

Remove several chars!

It removes a set of chars from a string, by using ParamArray, it is very simple! It was submitted as a alternative to another submission : http://www.planet-source-code.com/vb/scripts/showcode.asp?txtCodeId=39842&lngWId=1

AI

AI சுருக்கம்: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

மூலக் குறியீடு
original-source
Public Sub TestIt()
 Dim sText As String
 sText = InputBox("Please write something you want to remove 'e;s;n;t' from!", "Remove Char test", "It doesent work!")
 MsgBox RemoveChar(sText, "e", "s", "n", "t")
End Sub
Public Function RemoveChar(ByVal sText As String, ParamArray sChar()) As String
Dim lngdo As Long
 For lngdo = LBound(sChar) To UBound(sChar)
  sText = Replace(sText, sChar(lngdo), "")
 Next lngdo
 RemoveChar = sText
 MsgBox "Removed: " & Join(sChar, ";")
End Function
அசல் கருத்துகள் (3)
வேபேக் மெஷினிலிருந்து (Wayback Machine) மீட்டெடுக்கப்பட்டது