|
-
Apr 23rd, 2007, 07:20 AM
#20
Re: Faster InStrRev
randem: check your function's values with the test strings I provided. It gives odd results.
KEYWORD = "abcdefghijklmnopqrstuvwxyzåäö"
TEST = String$(100000, "X") & KEYWORD
Returns: -31071 (should be 100001)
KEYWORD = "abcdefghijklmnopqrstuvwxyzåäö"
TEST = KEYWORD & String$(100000, "X")
Returns: 1 (correct)
You can also optimize your function by about 25% (with the big string I used) if you switch ByVal to ByRef in strings. ByVal causes strings to be copied, which isn't so nice.
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
|