0
我需要通過一個字符串列表並計算重複的次數,然後用一行中出現次數的字符串打印到文件。這是我的,但我只需要打印一次字符串和它的數量。組重複計數
Do
line = LineInput(1)
Trim(line)
If line = temp Then
counter += 1
Else
counter = 1
End If
temp = line
swriter.WriteLine(line & " " & counter.ToString)
swriter.Flush()
Loop While Not EOF(1)
我的大腦只是今天沒有發揮作用..