30-03-16, 09:43 AM
(آخر تعديل لهذه المشاركة : 30-03-16, 09:54 AM {2} بواسطة silverlight.)
حاول شئ من هذا القبيل
الاستخدام
هنا تحديدا انا قمت بإضافة العناصر الموجودةفي التكست الي ليست بوكس من اجل التوضيح لا غير
PHP كود :
Friend Function GetRepeatedString(source As String, firstWord As String) As List(Of String)
Dim list As List(Of String) = CType(Nothing, List(Of String))
If Not String.IsNullOrEmpty(source) Then
Return New List(Of String)(source.Split({firstWord}, StringSplitOptions.RemoveEmptyEntries))
End If
Return CType(Nothing, List(Of String))
End Function
الاستخدام
PHP كود :
Dim source As String = "Fox Can you Read? Fox Can you play? Fox Can you code?"
Dim firstword As String = "Fox"
هنا تحديدا انا قمت بإضافة العناصر الموجودةفي التكست الي ليست بوكس من اجل التوضيح لا غير
PHP كود :
For Each i As String In GetRepeatedString(source, firstword)
ListBox1.Items.Add(i)
Next

