4个回答
展开全部
str = "a string with multiple a's"
position = 0
n = Len(str)
count = 0
Do
position = InStr(position + 1, str, "a")
n = n - 1
count = count + 1
Loop Until position = 0 Or n = 0
MsgBox count
position = 0
n = Len(str)
count = 0
Do
position = InStr(position + 1, str, "a")
n = n - 1
count = count + 1
Loop Until position = 0 Or n = 0
MsgBox count
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Dim l As String = "xxddaaadfbadg"
Dim count As Integer
Dim m(10) As Object
Dim y(10) As Single
Do Until InStr(l, "a") = 0
l = Mid(l, InStr(l, "a") + 1)
m(0) = m(0) + 1
count = CType(m(0), Integer)
RichTextBox1.Text = count
Loop
Dim count As Integer
Dim m(10) As Object
Dim y(10) As Single
Do Until InStr(l, "a") = 0
l = Mid(l, InStr(l, "a") + 1)
m(0) = m(0) + 1
count = CType(m(0), Integer)
RichTextBox1.Text = count
Loop
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
dim fiel()
dim str
str="aaabbbbccssssaaddfds"
fiel=split(str,"")
debug.print ubound(fiel)
dim str
str="aaabbbbccssssaaddfds"
fiel=split(str,"")
debug.print ubound(fiel)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询