|
-
Feb 3rd, 2005, 02:57 PM
#15
Thread Starter
Fanatic Member
Re: Stupid inherits issue, or not?.
 Originally Posted by <ABX
Ah.. i missed the form... (i didnt open the project)
what i think:
Not bad...
You may find using Regular Expressions a better solution for doing this...
I still would prefer you to use IndexOf (as it is the vb.net way, and it still is using it anyway) (same with mid. (String.Substring)
You are using Option Explict, Option Strict 
Modulization (splitting code up into classes, blocks) ok, you still do alot in your form.
Identing: good.
VB Code:
Private Function isSpace(ByVal var As String) As Boolean
If var = Chr(32) Then isSpace = True
End Function
Private Function isLetter(ByRef var As String) As Boolean
If Asc(var) >= 65 And _
Asc(var) <= 90 Or _
Asc(var) >= 97 And _
Asc(var) <= 122 Then
isLetter = True
End If
End Function
could be replaced with
VB Code:
Char.IsLetter("x"c)
Char.IsWhiteSpace("x"c)
Its pretty good 
IsLetter and IsWhiteSpace was originally for vb6. Thanks for pointing the built in features out.
As for the regular expressions, a friend wrote a function to do almost the same thing as mine, except it was painfully slow. But it was a good idea at the time. My method is a linear solution that doesn't add overhead. It needs to be as fast as possible because I have to perform this on hundreds of files.
As for the indexOf, I would, but I am still not sure how to include the CompareMethod parameter. How do I do that again?
Thanks!
Last edited by nkad; Feb 3rd, 2005 at 03:07 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|