MemoryExtensions Class

Provides extensions for the ReadOnlyMemoryT and ReadOnlySpanT structures.

Definition

Namespace: Ookii.Common
Assembly: Ookii.Common (in Ookii.Common.dll) Version: 1.0.0+7c2900b8a16cd8ae46bdd79d8f105034712c5fa3
C#
public static class MemoryExtensions
Inheritance
Object    MemoryExtensions

Methods

Split(ReadOnlyMemoryChar, ReadOnlySpanChar, StringSplitOptions) Splits a string memory region into segments using the specified separator.
Split(ReadOnlySpanChar, ReadOnlySpanChar, StringSplitOptions) Splits a string span into segments using the specified separator.
SplitAtT(ReadOnlyMemoryT, Int32, Int32) Splits a ReadOnlyMemoryT into two parts at the specified index, optionally skipping the specified number of elements.
SplitAtT(ReadOnlySpanT, Int32, Int32) Splits a ReadOnlySpanT into two parts at the specified index, optionally skipping the specified number of elements.
SplitOnce(ReadOnlyMemoryChar, ReadOnlySpanChar, StringComparison) Splits a read-only memory region of characters into two parts at the first occurrence of a separator.
SplitOnce(ReadOnlySpanChar, ReadOnlySpanChar, StringComparison) Splits a span of characters into two parts at the first occurrence of a separator.
SplitOnce(ReadOnlyMemoryChar, ReadOnlySpanChar, CultureInfo, CompareOptions) Splits a read-only memory region of characters into two parts at the first occurrence of a separator.
SplitOnce(ReadOnlySpanChar, ReadOnlySpanChar, CultureInfo, CompareOptions) Splits a span of characters into two parts at the first occurrence of a separator.
SplitOnceT(ReadOnlyMemoryT, T) Splits a ReadOnlyMemoryT into two parts at the first occurrence of a separator.
SplitOnceT(ReadOnlyMemoryT, ReadOnlySpanT) Splits a ReadOnlyMemoryT into two parts at the first occurrence of a separator.
SplitOnceT(ReadOnlySpanT, T) Splits a ReadOnlySpanT into two parts at the first occurrence of a separator.
SplitOnceT(ReadOnlySpanT, ReadOnlySpanT) Splits a ReadOnlySpanT into two parts at the first occurrence of a separator.
SplitOnceAnyT(ReadOnlyMemoryT, ReadOnlySpanT) Splits a ReadOnlyMemoryT into two parts at the first occurrence of any of the specified separators.
SplitOnceAnyT(ReadOnlySpanT, ReadOnlySpanT) Splits a ReadOnlySpanT into two parts at the first occurrence of any of the specified separators.
SplitOnceLast(ReadOnlyMemoryChar, ReadOnlySpanChar, StringComparison) Splits a read-only memory region of characters into two parts at the last occurrence of a separator.
SplitOnceLast(ReadOnlySpanChar, ReadOnlySpanChar, StringComparison) Splits a span of characters into two parts at the last occurrence of a separator.
SplitOnceLast(ReadOnlyMemoryChar, ReadOnlySpanChar, CultureInfo, CompareOptions) Splits a read-only memory region of characters into two parts at the first occurrence of a separator.
SplitOnceLast(ReadOnlySpanChar, ReadOnlySpanChar, CultureInfo, CompareOptions) Splits a span of characters into two parts at the last occurrence of a separator.
SplitOnceLastT(ReadOnlyMemoryT, T) Splits a ReadOnlyMemoryT into two parts at the last occurrence of a separator.
SplitOnceLastT(ReadOnlyMemoryT, ReadOnlySpanT) Splits a ReadOnlyMemoryT into two parts at the last occurrence of a separator.
SplitOnceLastT(ReadOnlySpanT, T) Splits a ReadOnlySpanT into two parts at the last occurrence of a separator.
SplitOnceLastT(ReadOnlySpanT, ReadOnlySpanT) Splits a ReadOnlySpanT into two parts at the first occurrence of a separator.
SplitOnceLastAnyT(ReadOnlyMemoryT, ReadOnlySpanT) Splits a ReadOnlyMemoryT into two parts at the last occurrence of any of the specified separators.
SplitOnceLastAnyT(ReadOnlySpanT, ReadOnlySpanT) Splits a ReadOnlySpanT into two parts at the last occurrence of any of the specified separators.
StripPrefix(ReadOnlyMemoryChar, ReadOnlySpanChar, StringComparison) Removes a prefix from a read-only memory region of characters.
StripPrefix(ReadOnlySpanChar, ReadOnlySpanChar, StringComparison) Removes a prefix from a span of characters.
StripPrefix(ReadOnlyMemoryChar, ReadOnlySpanChar, CultureInfo, CompareOptions) Removes a prefix from a read-only memory region of characters.
StripPrefix(ReadOnlySpanChar, ReadOnlySpanChar, CultureInfo, CompareOptions) Removes a prefix from a span of characters.
StripPrefixT(ReadOnlyMemoryT, ReadOnlySpanT) Removes a prefix from a ReadOnlyMemoryT.
StripPrefixT(ReadOnlySpanT, ReadOnlySpanT) Removes a prefix from a ReadOnlySpanT.
StripSuffix(ReadOnlyMemoryChar, ReadOnlySpanChar, StringComparison) Removes a suffix from a read-only memory region of characters.
StripSuffix(ReadOnlySpanChar, ReadOnlySpanChar, StringComparison) Removes a suffix from a span of characters.
StripSuffix(ReadOnlyMemoryChar, ReadOnlySpanChar, CultureInfo, CompareOptions) Removes a suffix from a read-only memory region of characters.
StripSuffix(ReadOnlySpanChar, ReadOnlySpanChar, CultureInfo, CompareOptions) Removes a suffix from a span of characters.
StripSuffixT(ReadOnlyMemoryT, ReadOnlySpanT) Removes a suffix from a ReadOnlyMemoryT.
StripSuffixT(ReadOnlySpanT, ReadOnlySpanT) Removes a suffix from a ReadOnlySpanT.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also