StringPolyfillExtension Class
Extension methods for the
String class, which are used
as polyfills for methods from current .NET versions.
Namespace: FolkerKinzel.StringsAssembly: FolkerKinzel.Strings (in FolkerKinzel.Strings.dll) Version: 9.4.0+10a7d4d71aa960998e32ac0ac6c4fcbe4164c917
public static class StringPolyfillExtension
<ExtensionAttribute>
Public NotInheritable Class StringPolyfillExtension
[ExtensionAttribute]
public ref class StringPolyfillExtension abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type StringPolyfillExtension = class end
- Inheritance
- Object StringPolyfillExtension
To match the behavior of the original methods, these extension methods throw
a
NullReferenceException when called on a
null string.
| Contains(String, Char) | Returns a value indicating whether a specified character appears in the
String. |
| Contains(String, Char, StringComparison) | Returns a value indicating whether a specified character occurs within this
String, using the specified comparison rules. |
| Contains(String, String, StringComparison) | Returns a value indicating whether a specified String occurs
within s, using the specified comparison rules. |
| EndsWith | Indicates whether the end of s matches the specified
character. |
| IndexOf | Returns the zero-based index of the first occurrence of the specified Unicode
character in this String. A parameter specifies the type of search
to use for the specified character. |
| Replace | Returns a new String in which all occurrences of a specified
String in the current String are replaced with another
specified String, using the provided comparison type. |
| ReplaceLineEndings(String) | Replaces all newlines in s with
NewLine. |
| ReplaceLineEndings(String, String) | Replaces all newlines in s with
replacementText. |
| Split(String, Char, StringSplitOptions) | Splits a String into substrings based on a specified delimiting
character and, optionally, options. |
| Split(String, String, StringSplitOptions) | Splits a String into substrings based on the provided separator,
optionally omitting empty substrings from the result. |
| Split(String, Char, Int32, StringSplitOptions) | Splits a String into a maximum number of substrings based
on the provided character separator, optionally omitting empty substrings from the
result. |
| Split(String, String, Int32, StringSplitOptions) | Splits a String into a maximum number of substrings based
on the provided separator, optionally omitting empty substrings from the result. |
| StartsWith | Indicates whether s starts with the specified character. |
| Trim(String, ReadOnlySpanChar) | Generates a String from which all leading and trailing
occurrences of the characters in the specified read-only span are removed. |
| Trim(String, String) | Generates a String from which all leading and trailing
occurrences of the characters in the specified read-only span are removed. |
| TrimEnd(String, ReadOnlySpanChar) | Generates a String from which all trailing occurrences of
the characters in the specified read-only span are removed. |
| TrimEnd(String, String) | Generates a String from which all trailing occurrences of
the characters in the specified read-only span are removed. |
| TrimStart(String, ReadOnlySpanChar) | Generates a String from which all leading occurrences of
the characters in the specified read-only span are removed. |
| TrimStart(String, String) | Generates a String from which all leading occurrences of
the characters in the specified read-only span are removed. |