求教,一个字符串问题
有个字符串:
"01,04,01,12,13,14,04,35,67,89,01,55 "
我想统计,例如: "04 "出现的次数,多谢懂的朋友教一下.
[解决办法]
dim s() as integer
s=split(str, ", ")
for i=0 to ubound(s)
if s(i)= "04 " then iCount=iCount+1
next i
大致就这样了,你自己再看看
[解决办法]
dim b() as string
b=split( "01,04,01,12,13,14,04,35,67,89,01,55 ", ", ")
dim i as integer
dim n as integer
for i=0 to uBound(b)
if b(i)= "04 " then n=n+1
next
debug.print n
[解决办法]
b=split( "01,04,01,12,13,14,04,35,67,89,01,55 ", "04 ")
msgbox uBound(b)
简单明了