Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to output non-duplicate strings after removing duplicate strings?
#2
Function ARRAY_str_RemoveDuplicates
Code:
Copy      Help
;/
function ARRAY(str)&a

int i j
for i a.len-1 -1 -1
,str& s=a[i]
,for j 0 i
,,if a[j]=s
,,,a.remove(i)
,,,break

test
Macro Macro358
Code:
Copy      Help
str s=
;123
;456
;789
;789
;123
;456
;456
;123
;789

ARRAY(str) a=s
ARRAY_str_RemoveDuplicates a
out a


Messages In This Thread
RE: How to output non-duplicate strings after removing duplicate strings? - by Gintaras - 04-04-2019, 02:51 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)