Remove carriage return from string

前端 未结 9 2044
逝去的感伤
逝去的感伤 2021-01-03 17:41

I would like to insert the following into a string

some text here

some text here

some text here

9条回答
  •  孤城傲影
    2021-01-03 17:55

    Assign your string to a variable and then replace the line break and carriage return characters with nothing, like this:

     myString = myString.Replace(vbCrLf, "")
    

提交回复
热议问题