Table of Contents

Class StringExtensions

Namespace
Alternet.Common
Assembly
Alternet.Common.v9.dll

Contains extended methods for string objects.

public static class StringExtensions
Inheritance
StringExtensions

Methods

Contains(string, string, StringComparison)

Checks whether source string contains toCheck string.

IndexOfOccurence(string, char, int, int)

Reports the zero-based index of the occurenceCount 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)
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.