StripNonNumeric函数源程序

 1   
 2Function StripNonNumeric(strInput)   
 3Dim iPos, sNew, iTemp   
 4strInput = Trim(strInput)   
 5If strInput <> "" Then   
 6iPos = 1   
 7iTemp = Len(strInput)   
 8While iTemp >= iPos   
 9If IsNumeric(Mid(strInput,iPos,1)) = True Then   
10sNew = sNew & Mid(strInput,iPos,1)   
11End If   
12iPos = iPos + 1   
13Wend   
14Else   
15sNew = ""   
16End If   
17StripNonNumeric = sNew   
18End Function   
Published At
Categories with Web编程
Tagged with
comments powered by Disqus