تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مساعدة كود تقسيم ملف الى فقرات تبدأ بكلمة محددة
#2
حاول شئ من هذا القبيل

PHP كود :
  Friend Function GetRepeatedString(source As StringfirstWord As String) As List(Of String)
 
       Dim list As List(Of String) = CType(Nothing, List(Of String))
 
       If Not String.IsNullOrEmpty(sourceThen
            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(sourcefirstword)
 
           ListBox1.Items.Add(i)
 
       Next 
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
RE: مساعدة كود تقسيم ملف الى فقرات تبدأ بكلمة محددة - بواسطة silverlight - 30-03-16, 09:43 AM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم