10-04-2009, 12:05 PM
I figured i didn't need to post the results for just a regular number because the results were about the same.
Quote:%Faster -12.5| -16.7| -28.6| -14.3| 20| -14.3| -14.3| 0| 0| -14.3
Test1 7| 5| 5| 6| 6| 6| 6| 6| 6| 6
Test2 8| 6| 7| 7| 5| 7| 7| 6| 6| 7
Code:
Public Sub TestOne()
CCInt "222"
End Sub
Private Function CCInt(ByRef s As String) As Integer
If LenB(s) = 0 Then Exit Function
If Not s Like "*[!0-9]*" Then CCInt = CInt(s)
End Function
Code:
Public Sub TestTwo()
CCInt "222"
End Sub
Private Function CCInt(ByRef s As String) As Integer
If LenB(s) = 0 Then Exit Function
If IsNumeric(s) Then CCInt = CInt(s)
End Function