I\'m looking for String extension methods for TrimStart()
and TrimEnd()
that accept a string parameter.
I could build one myself but I\'m alw
from dotnetperls.com,
Performance
Unfortunately, the TrimStart method is not heavily optimized. In specific situations, you will likely be able to write character-based iteration code that can outperform it. This is because an array must be created to use TrimStart.
However: Custom code would not necessarily require an array. But for quickly-developed applications, the TrimStart method is useful.