VB.NET - Remove a characters from a String

前端 未结 4 1739
小蘑菇
小蘑菇 2021-02-18 15:34

I have this string:

Dim stringToCleanUp As String = \"bon;jour\"
Dim characterToRemove As String = \";\"

I want a function who removes the \';\

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-18 16:10

    The string class's Replace method can also be used to remove multiple characters from a string:

    Dim newstring As String
    newstring = oldstring.Replace(",", "").Replace(";", "")
    

提交回复
热议问题