Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,33 +0,0 @@
|
|||
Function consolidate(s)
|
||||
sets = Split(s,",")
|
||||
n = UBound(sets)
|
||||
For i = 1 To n
|
||||
p = i
|
||||
ts = ""
|
||||
For j = i To 1 Step -1
|
||||
If ts = "" Then
|
||||
p = j
|
||||
End If
|
||||
ts = ""
|
||||
For k = 1 To Len(sets(p))
|
||||
If InStr(1,sets(j-1),Mid(sets(p),k,1)) = 0 Then
|
||||
ts = ts & Mid(sets(p),k,1)
|
||||
End If
|
||||
Next
|
||||
If Len(ts) < Len(sets(p)) Then
|
||||
sets(j-1) = sets(j-1) & ts
|
||||
sets(p) = "-"
|
||||
ts = ""
|
||||
Else
|
||||
p = i
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
consolidate = s & " = " & Join(sets," , ")
|
||||
End Function
|
||||
|
||||
'testing
|
||||
test = Array("AB","AB,CD","AB,CD,DB","HIK,AB,CD,DB,FGH")
|
||||
For Each t In test
|
||||
WScript.StdOut.WriteLine consolidate(t)
|
||||
Next
|
||||
Loading…
Add table
Add a link
Reference in a new issue