2011年2月7日 星期一

Split String 好的範例

參考來源
---
真是精妙,值得參考
--- Program that uses Split on String [VB.NET] ---

Module Module1

Sub Main()
' We want to split this input string
Dim s As String = "there is a cat"

' Split string based on spaces
Dim words As String() = s.Split(New Char() {" "c})

' Use For Each loop over words and display them
Dim word As String
For Each word In words
Console.WriteLine(word)
Next
End Sub

End Module

沒有留言:

張貼留言