Posts: 1,769
Threads: 410
Joined: Feb 2003
one thing that would be really useful is something that would pull out the duplicate items in a list but i dont know where to start for this.
ie
apple
orange
apple
grape
returns
apple
orange
grape
any ideas how i can do this?
Posts: 12,140
Threads: 142
Joined: Dec 2002
Create member function
str.RemoveDuplicateLines and paste this code.
function [flags] ;;flags: 1 case insensitive
;EXAMPLE
;str s=
;;apple
;;apple
;;orange
;;apple
;;grape
;;orange
;
;s.RemoveDuplicateLines
if(!this.end("[]")) this+"[]"
str s ss
int i j
for i 0 1000000000
,j=s.getl(this i)
,if(j<0) break
,ss.from("[]" s "[]")
,this.findreplace(ss "[]" 8|(flags&1) "" j+s.len)
Posts: 1,769
Threads: 410
Joined: Feb 2003
in a word...
DANG!!!!!
8)
THANKS