ReadOnlySpanExtension Class

Extension methods for the ReadOnlySpan<Char> struct.

Definition

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

Methods

ContainsNewLineIndicates whether a read-only character span contains a newline character.
ContainsWhiteSpaceIndicates whether a read-only span of characters contains white space.
GetPersistentHashCodeGenerates the same Int32 hash code for an identical string of characters each time the program is run.
IsAsciiChecks whether the read-only character span contains only Unicode characters that belong to the ASCII character set.
LastIndexOfSpecifies the zero based index position of the last occurrence of a specified character sequence in span. The search begins at a specified character position and runs backwards to the beginning of the character span for a specified number of character positions. A parameter specifies the type of comparison to be performed when searching for the specified character sequence.
LastIndexOfAny(ReadOnlySpanChar, SearchValuesPolyfillChar, Int32, Int32)Returns the zero-based index of the last occurrence of one of the specified characters in span. The search begins at a specified character position and runs a specified number of character positions backwards to the beginning of the span.
LastIndexOfAny(ReadOnlySpanChar, ReadOnlySpanChar, Int32, Int32)Returns the zero-based index of the last occurrence of one of the specified characters in span. The search begins at a specified character position and runs a specified number of character positions backwards to the beginning of the span.
Trim Removes all leading and trailing occurrences of a set of characters specified in a SearchValuesPolyfill<Char> instance from a read-only character span.
TrimEnd Removes all trailing occurrences of a set of characters specified in a SearchValuesPolyfill<Char> instance from a read-only character span.
TrimStart Removes all leading occurrences of a set of characters specified in a SearchValuesPolyfill<Char> instance from a read-only character span.

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