正在加载中...

关闭
请选择需要拨打的号码

信息详页

返回
asp 字符串统计出现相同个数
ss = "张三||李四||王五||张三||张三||王五"
s = Split(ss, "||")
For i = 0 To UBound(s)
    If s(i) <> "" Then
        Response.Write s(i) & "("
        k = 1
        For j = i + 1 To UBound(s)
            If s(j) = s(i) Then
                k = k + 1
                s(j) = ""
            End If
        Next
        Response.Write k & ") "
    End If
Next