TextUtility Class

Namespace
Kampute.DocToolkit.Support
Assembly
  • Kampute.DocToolkit.dll

Definition

Provides utility methods for text processing.
public static class TextUtility
Inheritance

Methods

NormalizeCodeBlock(string, int)Normalizes the text of a code block by removing leading and trailing empty lines, collapsing consecutive empty lines, and normalizing indentation.
NormalizeIndentation(IList<string>, int)Normalizes the indentation of the specified text lines in-place.
NormalizeWhitespace(string, bool)Normalizes whitespace characters by replacing sequences of whitespace with a single space.
SplitLines(string, int, bool)Enumerates lines of text, splitting the input string into lines based on a specified maximum line width.
SplitWords(string)Enumerates word boundaries in the given text, identifying words separated by non-alphanumeric characters or case changes, and provides information about whether each word is an acronym.