Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternative to Mid()
Message
From
12/10/2010 04:19:26
 
 
To
11/10/2010 16:13:43
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01484803
Message ID:
01484935
Views:
46
>Mid() doesn't perform very well if you have a string at 20k. I have been looking since the last hour at an alternative using StringBuilder to achieve the same but was unable to find something valuable. Has anyone had to deal with long string when using Mid()?

Not really an answer but isn't Mid() in the Microsoft.VisualBasic library and just there for VB6 compatability. Only difference I see between that and SubString() is that it won't throw an exception if the first parameter is greater than the string length. Not suggesting that Substring() will be faster (although it may be) - just that Mid() has no advantage.

Did you say elswhere that the 'search for' string can be 20K?
If so then how long is the 'search in' string ?
How likely is it that, for example, the first *half* of the 20K string would be matched ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform