Visual Basic判断字符串最大连号数,比如12233444返回3,因为444是三连号
1条回答 默认 最新
- threenewbee 2016-03-01 21:59关注
dim n = 0 dim max = 0 for i = 2 to len(s) if mid(s,i,1)=mid(s,i-1,1) then n = n + 1 else if n > max then max = n n = 1 end if next msgbox max
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报