Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternative to Mid()
Message
From
12/10/2010 11:39:17
 
 
To
12/10/2010 02:14:48
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:
01484997
Views:
43
>[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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform