Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove doubles from string
#8
I Called it RemoveDuplicateLines and the code i copy/pasted:

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)

Something wrong with the procedure?

I placed the member function in the folder in which my macro also is.....


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)