Remove carriage return from string

前端 未结 9 2094
逝去的感伤
逝去的感伤 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 18:01

    For VB.net

    vbcrlf = environment.newline...

    Dim MyString As String = "This is a Test" & Environment.NewLine & " This is the second line!"

    Dim MyNewString As String = MyString.Replace(Environment.NewLine,String.Empty)
    

提交回复
热议问题