VBS去除指定的字符串中的重复项返回重复后的字符串
sub replaceComon(str) for i=1 to len(str) tempstr=mid(str,i,1) finalstr="" if instr(1,finalstr,tempstr,1)>0 then '查找到了重复的字符 str=replace(str,tempstr,"") else '没有查找到重复的字符的时候就追加字符到新字符串中 finalstr=finalstr+tempstr end if next replaceComon=finalstr end sub
作者:高级测试开发网
博客地址:https://seniortesting.club
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。