Using StringBuilder To Replace Values
We commonly think of StringBuilder as a class to build up new string values, but it could also be used to alter an existing string efficiently.
Author's benchmarks show significantly less allocations. The StringBuilder implementation allocates about 20% of what the String implementation does.
https://khalidabuhakmeh.com/using-stringbuilder-to-replace-values
#string #performance
Post #2247
229