Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternative to Mid()
Message
From
12/10/2010 02:14:48
 
 
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:
01484923
Views:
51
>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()?

[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];
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform