StringManipulation Class

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

Definition

Provides extension methods for strings to manipulate text.
public static class StringManipulation
Inheritance

Methods

RemoveMany(this string, ReadOnlySpan<char>)Removes multiple characters from the given text.
ReplaceMany(this string, ReadOnlySpan<char>, char, bool)Replaces multiple characters in the given text with a single character.
SplitFirst(this string, char)Splits a string into two parts at the first occurrence of the specified separator character.
SplitLast(this string, char)Splits a string into two parts at the last occurrence of the specified separator character.
SubstringAfter(this string, char)Returns the section of a string after the first occurrence of the specified character.
SubstringAfterLast(this string, char)Returns the section of a string after the last occurrence of the specified character.
SubstringAfterLastOrSelf(this string, char)Returns the section of a string after the last occurrence of the specified character.
SubstringAfterOrSelf(this string, char)Returns the section of a string after the first occurrence of the specified character.
SubstringBefore(this string, char)Returns the section of a string before the first occurrence of the specified character.
SubstringBeforeLast(this string, char)Returns the section of a string before the last occurrence of the specified character.
SubstringBeforeLastOrSelf(this string, char)Returns the section of a string before the last occurrence of the specified character.
SubstringBeforeOrSelf(this string, char)Returns the section of a string before the first occurrence of the specified character.
ToTitleCase(this string)Converts a string to title case, where the first letter of each word is capitalized.