Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternative to Mid()
Message
De
12/10/2010 04:19:26
 
 
À
11/10/2010 16:13:43
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01484803
Message ID:
01484935
Vues:
45
>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 ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform