Class StringExtensions
Contains extended methods for string objects.
public static class StringExtensions
- Inheritance
-
StringExtensions
Fields
Methods
- Contains(string, string, StringComparison)
Checks whether source string contains toCheck string.
- ContainsRange(string?, IEnumerable<string>)
Gets whether string contains any of the specified strings.
- IndexOfOccurrence(string, char, int, int)
Reports the zero-based index of the
occurrenceCount
occurrence of the specified character in this instance. The search starts at a specified character position.
- Replace(string, string, string, StringComparison, bool)
Returns a new string in which all occurrences of a specified string in the source string are replaced with another specified string.
- SplitToLines(string)
Splits given string into the array of strings using a new line char as a separator.
- ToHtml(string)
Converts plain string to the HTML-formatted text.
- ToPlainText(string)
Converts HTML-formatted string to the plain text.
- TrimEnd(string, string)
Removes all occurrences of a specified substring from the end of the target string.
- TrimStart(string, string)
Removes all occurrences of a specified substring from the beginning of the target string.