String 如何在vb 2010中拆分字符串或生成字符
我搜索了一下,但没有解释怎么做, 比如说String 如何在vb 2010中拆分字符串或生成字符,string,split,chars,String,Split,Chars,我搜索了一下,但没有解释怎么做, 比如说 Dim sentence as String = "cat is an animal" 如果我制作了一个msgbox: MsgBox(sentence) 它表明 cat is an animal 如何制作一个msgbox,上面写着 cat is an animal. 用新线替换空间的简易方法 如string words=MyString.Replace(“,”\r\n”) Split将在空间上拆分为一个数组,然后用新行连接起来,这是毫无意义的,除
Dim sentence as String = "cat is an animal"
如果我制作了一个msgbox:
MsgBox(sentence)
它表明
cat is an animal
如何制作一个msgbox,上面写着
cat
is
an
animal.
用新线替换空间的简易方法 如string words=
MyString.Replace(“,”\r\n”)
Split将在空间上拆分为一个数组,然后用新行连接起来,这是毫无意义的,除非你需要数组来做其他事情。我得到了代码:Dim sentence2 As String=“cat is animal”Dim-sentence2.Replace(“”,vbNewLine)MsgBox(句子)好了,你学到了一些东西。令人满意,不是吗?比有人给你答案更重要。我能想出很多方法来满足你的要求,主要是因为我下了决心,学会了这些方法。“把密码给我”,嘘