Removing all spaces in a string

前端 未结 4 660
无人及你
无人及你 2021-01-21 03:46

Is there any function in vb.net that removes all spaces in a string. I mean a string like \' What is this\' should be \'Whatisthis\'

Thanks Furqan

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-21 04:22

    You could use String.Replace:

    Dim str As String = " What is this"
    str = str.Replace(" ", "")
    

提交回复
热议问题