T
Tim Frawley
I have a method for testing variable length strings for all digits:
Dim ch As String
Dim i As Integer
AllDigits = True
For i = 1 To Len(txt)
' See if the next character is a non-digit.
ch = Mid$(txt, i, 1)
If ch < "0" Or ch > "9" Then
' This is not a digit.
AllDigits = False
Exit For
End If
Next i
Does anyone know of a faster method in vb.net that does not require
looping the length of the string until an invalid character is found?
Dim ch As String
Dim i As Integer
AllDigits = True
For i = 1 To Len(txt)
' See if the next character is a non-digit.
ch = Mid$(txt, i, 1)
If ch < "0" Or ch > "9" Then
' This is not a digit.
AllDigits = False
Exit For
End If
Next i
Does anyone know of a faster method in vb.net that does not require
looping the length of the string until an invalid character is found?