Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimized way to transfer from String to StringBuilder
Message
From
05/02/2014 13:13:35
 
 
To
05/02/2014 13:04:46
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:
01593079
Message ID:
01593306
Views:
22
>>>>So wouldn't this do the same thing:
lcString = lcString.Replace(lcWord + ".", "[" + lcWord + "].")
>>>
>>>Yes, but for very long string, doing so many processes on that string would fit better with a stringbuilder.
>>
>>Don't think so. The string is only being re-assigned once - I don't think Replace() creates any intermediary strings.
>
>Once per Replace(). He is talking about doing it for multiple lcWords which would create a new lcString for each lcWord replaced.

I know - I was just thinking in the context of the code Michel posted. I just posted a StringBuilder() version.
Previous
Reply
Map
View

Click here to load this message in the networking platform