Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternative to Mid()
Message
De
12/10/2010 11:39:17
 
 
À
12/10/2010 02:14:48
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:
01484997
Vues:
42
>[I have not installed vs2010 on my new computer yet - so I cannot test]
>
>If you use a lot of mid() it will be slow. The reason is - I think - that each call creates another string (object)
>
>Can you use one char at a time ? If yes, why not index the string
>
>char c ;
>string s = "very long string";
>
>c = s[5];
>
We are talking at thousands of MID() which have to be done in a flash. The string is also in the range of 20k. So, I am not sure if this would be any better. This is a highly complex algorythm. The best would be to have the StringBuilder to include a Mid() function. But, this is not supported yet.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform