How does the string replace function in VB.net not work?

后端 未结 6 532
生来不讨喜
生来不讨喜 2020-12-11 05:06

I wrote up some code. The code is shown below. The first part is to read a html into string format. The second part is to search a mark in the string and replace the string

6条回答
  •  情话喂你
    2020-12-11 05:24

    The Replace method returns the modified string.

    You need something like this:

    Dim TextPath = C:xxxxxx
    TempText = ReadTextFile(TextPath)
    Dim ModifiedString as String
    ModifiedString = TempText.Replace("the_key_string", "replace_by_this_string")
    

提交回复
热议问题