删除字符串中的所有空格

Fur*_*gal 3 vb.net

vb.net中是否有任何函数删除字符串中的所有空格.我的意思是像'这是什么'这样的字符串应该是'Whatisthis'

谢谢Furqan

Fré*_*idi 10

使用String.Replace()

Dim s As String = " What is this"
s = s.Replace(" ", "")
Run Code Online (Sandbox Code Playgroud)