StringBuilderExtension Class

Extension methods for the StringBuilder class.

Definition

Namespace: FolkerKinzel.Strings
Assembly: FolkerKinzel.Strings (in FolkerKinzel.Strings.dll) Version: 9.4.0+10a7d4d71aa960998e32ac0ac6c4fcbe4164c917
C#
public static class StringBuilderExtension
Inheritance
Object    StringBuilderExtension

Methods

AppendBase64(StringBuilder, Byte, Base64FormattingOptions)Appends the content of a Byte array as Base64-encoded character sequence to the end of a StringBuilder.
AppendBase64(StringBuilder, IEnumerableByte, Base64FormattingOptions)Appends the content of a Byte collection as Base64-encoded character sequence to the end of a StringBuilder.
AppendBase64(StringBuilder, ReadOnlySpanByte, Base64FormattingOptions)Appends the content of a read-only Byte span as Base64-encoded character sequence to the end of a StringBuilder.
AppendLine(StringBuilder, ReadOnlyMemoryChar)Appends a copy of the specified read-only character memory region followed by the standard line terminator to the end of a StringBuilder object.
AppendLine(StringBuilder, ReadOnlySpanChar)Appends a copy of the specified read-only character span followed by the standard line terminator to the end of a StringBuilder object.
AppendUrlEncoded(StringBuilder, Byte)Appends the content of a Byte array as URL-encoded character sequence to the end of a StringBuilder.
AppendUrlEncoded(StringBuilder, IEnumerableByte)Appends the content of a Byte collection as URL-encoded character sequence to the end of a StringBuilder.
AppendUrlEncoded(StringBuilder, ReadOnlySpanByte)Appends the content of a read-only Byte span as URL-encoded character sequence to the end of a StringBuilder.
AppendUrlEncoded(StringBuilder, ReadOnlySpanChar)Appends the content of a read-only character span as URL-encoded string to the end of a StringBuilder.
Contains(StringBuilder, Char)Indicates whether a specified Unicode character is found in a StringBuilder.
Contains(StringBuilder, Char, Int32)Indicates whether a specified Unicode character is found in a StringBuilder. The search starts at the specified index.
Contains(StringBuilder, Char, Int32, Int32)Indicates whether a specified Unicode character is found in a StringBuilder. The search begins at a specified index and a specified number of character positions are checked.
ContainsNewLine(StringBuilder)Indicates whether the StringBuilder contains a newline character.
ContainsNewLine(StringBuilder, Int32)Examines a section of the StringBuilder that begins at startIndex to see whether it contains a newline character.
ContainsNewLine(StringBuilder, Int32, Int32)Examines a section of the StringBuilder that begins at startIndex and includes count characters to determine whether this section contains a newline character.
ContainsNonAscii(StringBuilder)Indicates whether the StringBuilder contains Unicode characters that do not belong to the ASCII character set.
ContainsNonAscii(StringBuilder, Int32)Examines a section of the StringBuilder that begins at startIndex to see whether it contains Unicode characters that do not belong to the ASCII character set .
ContainsNonAscii(StringBuilder, Int32, Int32)Examines a section of the StringBuilder that begins at startIndex and includes count characters to determine whether this section contains Unicode characters that do not belong to the ASCII character set.
ContainsWhiteSpace(StringBuilder)Indicates whether the StringBuilder contains white space.
ContainsWhiteSpace(StringBuilder, Int32)Examines a section of the StringBuilder that begins at startIndex to see whether it contains white space.
ContainsWhiteSpace(StringBuilder, Int32, Int32)Examines a section of the StringBuilder that begins at startIndex and includes count characters to determine whether this section contains white space.
EndsWithIndicates whether the specified Unicode character matches the end of the StringBuilder.
GetPersistentHashCodeGenerates the same Int32 hash code for an identical string of characters each time the program is run.
IndexOf(StringBuilder, Char)Specifies the zero-based index of the first occurrence of the specified character in builder.
IndexOf(StringBuilder, Char, Int32)Returns the zero-based index of the first occurrence of the specified character in builder. The search starts at the specified index.
IndexOf(StringBuilder, Char, Int32, Int32)Returns the zero-based index of the first occurrence of the specified character in builder. The search begins at a specified index and a specified number of character positions are checked.
LastIndexOf(StringBuilder, Char)Returns the zero-based index of the last occurrence of the specified character in builder.
LastIndexOf(StringBuilder, Char, Int32)Returns the zero-based index of the last occurrence of the specified character in builder. The search begins at a specified character position and runs backwards to the beginning of the StringBuilder.
LastIndexOf(StringBuilder, Char, Int32, Int32)Specifies the zero-based index of the last occurrence of the specified character in builder. The search begins at a specified index and runs backwards for a specified number of character positions to the beginning of the StringBuilder.
Replace(StringBuilder, Char, Char, Int32)Replaces, within a substring of builder, all occurrences of a specified character with another specified character.
Replace(StringBuilder, String, String, Int32)Replaces all occurrences of a specified string in a substring of builder with another specified string.
ReplaceLineEndingsReplaces all newlines in builder with replacementText.
ReplaceWhiteSpaceWith(StringBuilder, ReadOnlySpanChar, Boolean)Replaces in builder all sequences of white space with replacement.
ReplaceWhiteSpaceWith(StringBuilder, ReadOnlySpanChar, Int32, Boolean)Replaces in a section of builder, which starts at startIndex and extends to the end of builder, all sequences of white space with replacement.
ReplaceWhiteSpaceWith(StringBuilder, ReadOnlySpanChar, Int32, Int32, Boolean)Replaces in a section of builder, which starts at startIndex and which is count characters long, all sequences of white space with replacement.
StartsWithIndicates whether the specified Unicode character matches the beginning of builder.
ToLowerInvariant(StringBuilder)Converts the entire content of a StringBuilder to lowercase letters using the rules of the invariant culture.
ToLowerInvariant(StringBuilder, Int32)Converts the content of a StringBuilder starting with startIndex into lowercase letters and uses the rules of the invariant culture.
ToLowerInvariant(StringBuilder, Int32, Int32)Converts the content of a section in StringBuilder that begins at startIndex and includes count characters to lowercase using the rules of the invariant culture.
ToUpperInvariant(StringBuilder)Converts the entire content of a StringBuilder to uppercase letters using the rules of the invariant culture.
ToUpperInvariant(StringBuilder, Int32)Converts the content of a StringBuilder starting with startIndex into uppercase letters and uses the rules of the invariant culture.
ToUpperInvariant(StringBuilder, Int32, Int32)Converts the content of a section in StringBuilder that begins at startIndex and includes count characters to uppercase using the rules of the invariant culture.
Trim(StringBuilder)Removes all leading and trailing white-space characters from builder.
Trim(StringBuilder, Char)Removes all leading and trailing instances of a character from builder.
Trim(StringBuilder, Char)Removes all leading and trailing occurrences of a set of characters specified in an array from builder.
Trim(StringBuilder, ReadOnlySpanChar)Removes all leading and trailing occurrences of a set of characters specified in a read-only span from builder.
TrimEnd(StringBuilder)Removes all the trailing white-space characters from the builder.
TrimEnd(StringBuilder, Char)Removes all the trailing white-space characters from builder.
TrimEnd(StringBuilder, Char)Removes all the trailing occurrences of a set of characters specified in an array from builder.
TrimEnd(StringBuilder, ReadOnlySpanChar)Removes all trailing occurrences of a set of characters specified in a read-only span from builder.
TrimStart(StringBuilder)Removes all the leading white-space characters from builder.
TrimStart(StringBuilder, Char)Removes all the leading occurrences of a specified character from builder.
TrimStart(StringBuilder, Char)Removes all the leading occurrences of a set of characters specified in an array from builder.
TrimStart(StringBuilder, ReadOnlySpanChar)Removes all leading occurrences of a set of characters specified in a read-only span from builder.

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

See Also