$ filename "t.exe"
'uses RTL64
uses console  
uses StringUtil

Class FilterTextArray
'====================
'
has TextArray
  '
  method LeftFilter(string k) as string
  string s,u
  int i,e=mx
  for i = 1 to e
    s=line i
    if left(s,2)=k then
      u+=s+cr
    end if
  next
  return u
  end method
  '
end class

'TEST
  
new FilterTextArray t

string s=quote !!!
% one
  two
% three
% four
  five
% six
!!!

 'print "(source)" cr s cr cr
 t.lines s
 print "unsorted>>" cr t.lines() cr cr
 t.sortlines
 print "sorted>>" cr t.lines() cr cr
 print "filtered>>" cr t.LeftFilter("% ") cr
 wait
 del t
