Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternative to Mid()
Message
De
12/10/2010 12:10:18
 
 
À
12/10/2010 11:40:41
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:
01485003
Vues:
29
>>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.
>
>I heard that it is not totally the same thing. I have always used it in VB.NET. However, I read about SubString() as well. I haven't done any test on it yet.
>
>>Did you say elswhere that the 'search for' string can be 20K?
>
>Yes
>
>>If so then how long is the 'search in' string ?
>
>That would be an average of one character to 20 characters.

I think youv'e reversed your answers - i.e. you mean the 'search in' string can be 20K and the 'search-for' can be between 1 and 20 characters?

>>How likely is it that, for example, the first *half* of the 20K string would be matched ?
>
>I am not sure what you mean here.

As Naomi said - but it the 'search for' string if short the questions is not really relevant.

Elsewhere you mentioned that the Mid() would be called 'thousands' of times. Can you us a more general idea of what you are trying to achieve?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform