TextUtility.NormalizeWhitespace Method
- Namespace
- Kampute.DocToolkit.Support
- Assembly
- Kampute.DocToolkit.dll
Definition
Normalizes whitespace characters by replacing sequences of whitespace with a single space.
public static string NormalizeWhitespace(string text, bool trim = true)Parameters
textstring- The input text to normalize.
trimbool optional- Indicates whether to trim leading and trailing whitespace. Default is
false.
Returns
- string
- A string with normalized whitespace.
