總網頁瀏覽量

2011年11月2日 星期三

[VB.NET] 字串處理函式StartWith、EndWith


'StartWith、EndWith:像似sql語法中 like "%XXX" / like "XXX%"

For Each st In NameArray
            'Debug.WriteLine(st)
            If st.StartsWith("火") Then
                Console.WriteLine(st)
            End If
      Next
輸出所有書名有"火"的書,EndsWith即為反之

沒有留言:

張貼留言