48 if (
value.Length == 1)
60 if (
value.Length == 2)
405 if ((ulong)((
long)(uint)
start + (
long)(uint)
length) > (ulong)(uint)
text.Length)
466 if ((ulong)((
long)(uint)
start + (
long)(uint)
length) > (ulong)(uint)
text.Length)
494 if (
Unsafe.SizeOf<T>() == 1)
498 if (
Unsafe.SizeOf<T>() == 2)
511 if (
Unsafe.SizeOf<T>() == 1)
515 if (
Unsafe.SizeOf<T>() == 2)
528 if (
Unsafe.SizeOf<T>() == 1)
532 if (
Unsafe.SizeOf<T>() == 2)
545 if (
Unsafe.SizeOf<T>() == 1)
549 if (
Unsafe.SizeOf<T>() == 2)
562 if (
Unsafe.SizeOf<T>() == 1)
566 if (
Unsafe.SizeOf<T>() == 2)
590 nuint num = (nuint)
Unsafe.SizeOf<T>();
622 if (
Unsafe.SizeOf<T>() == 1)
626 if (
Unsafe.SizeOf<T>() == 2)
639 if (
Unsafe.SizeOf<T>() == 1)
643 if (
Unsafe.SizeOf<T>() == 2)
656 if (
Unsafe.SizeOf<T>() == 1)
660 if (
Unsafe.SizeOf<T>() == 2)
683 if (
Unsafe.SizeOf<T>() == 1)
687 if (
Unsafe.SizeOf<T>() == 2)
700 if (
Unsafe.SizeOf<T>() == 1)
704 if (
Unsafe.SizeOf<T>() == 2)
723 if (
Unsafe.SizeOf<T>() == 1)
727 if (
Unsafe.SizeOf<T>() == 2)
740 if (
Unsafe.SizeOf<T>() == 1)
744 if (
Unsafe.SizeOf<T>() == 2)
757 if (
Unsafe.SizeOf<T>() == 1)
769 if (
Unsafe.SizeOf<T>() == 2)
774 return SpanHelpers.
IndexOfAny(
ref Unsafe.As<T,
char>(
ref MemoryMarshal.GetReference(
span)),
reference2,
Unsafe.Add(
ref reference2, 1),
Unsafe.Add(
ref reference2, 2),
Unsafe.Add(
ref reference2, 3),
Unsafe.Add(
ref reference2, 4),
span.Length);
859 nuint num = (nuint)
Unsafe.SizeOf<T>();
888 nuint num = (nuint)
Unsafe.SizeOf<T>();
891 for (
int i = 0; i <
span.Length; i++)
904 for (
int j = 0;
j <
span.Length;
j++)
934 nuint num = (nuint)
Unsafe.SizeOf<T>();
954 nuint num = (nuint)
Unsafe.SizeOf<T>();
975 nuint num = (nuint)
Unsafe.SizeOf<T>();
996 nuint num = (nuint)
Unsafe.SizeOf<T>();
1012 if (
span.Length > 1)
1191 return (uint)(int)
intPtr > (uint)(-(other.Length *
Unsafe.SizeOf<T>()));
1195 if ((ulong)(long)
intPtr >= (ulong)((long)
span.Length * (
long)
Unsafe.SizeOf<T>()))
1197 return (ulong)(long)
intPtr > (ulong)(-((long)
other.Length * (
long)
Unsafe.SizeOf<T>()));
1224 if ((ulong)(long)
intPtr < (ulong)((long)
span.Length * (
long)
Unsafe.SizeOf<T>()) || (ulong)(
long)
intPtr > (ulong)(-((
long)other.Length * (long)
Unsafe.SizeOf<T>())))
1285 if (
span.Length > 1)
1297 if (
span.Length > 1)
1310 if (
keys.Length != items.Length)
1314 if (
keys.Length > 1)
1326 if (
keys.Length != items.Length)
1330 if (
keys.Length > 1)
1338 if (handler._success)
1354 for (
int i = 0; i <
span.Length; i++)
1383 return span.EqualsOrdinalIgnoreCase(
other);
1394 if (
value.Length == 0)
1408 if (
value.Length == 0)
1427 if (
span.Length == 0 ||
other.Length == 0)
1429 return span.Length -
other.Length;
1431 return string.CompareOrdinal(
span,
other);
1579 return span.EndsWithOrdinalIgnoreCase(
value);
1607 return span.StartsWithOrdinalIgnoreCase(
value);
1722 for (; i < span.Length &&
span[i] ==
null; i++)
1731 int num = span.Length - 1;
1741 while (num >=
start &&
span[num] ==
null)
1746 return num -
start + 1;
1926 int num = span.Length - 1;
1931 return num -
start + 1;
1973 for (i = 0; i < span.Length &&
char.IsWhiteSpace(
span[i]); i++)
1976 int num = span.Length - 1;
1981 return span.Slice(i, num - i + 1);
1987 for (i = 0; i < span.Length &&
char.IsWhiteSpace(
span[i]); i++)
1990 return span.Slice(i);
1995 int num = span.Length - 1;
2000 return span.Slice(0, num + 1);
2006 for (i = 0; i < span.Length &&
span[i] ==
trimChar; i++)
2009 int num = span.Length - 1;
2014 return span.Slice(i, num - i + 1);
2020 for (i = 0; i < span.Length &&
span[i] ==
trimChar; i++)
2023 return span.Slice(i);
2028 int num = span.Length - 1;
2033 return span.Slice(0, num + 1);
2045 return span.TrimStart();
2048 for (i = 0; i <
span.Length; i++)
2063 return span.Slice(i);
2070 return span.TrimEnd();
2073 for (num =
span.Length - 1; num >= 0; num--)
2088 return span.Slice(0, num + 1);
2111 for (i = 0; i < span.Length &&
char.IsWhiteSpace(
span[i]); i++)
2119 int num = span.Length - 1;
2124 return num -
start + 1;
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
static readonly CompareInfo Invariant
static CultureInfo CurrentCulture
static char ToLower(char c)
static char ToUpper(char c)
static int IndexOfOrdinalIgnoreCase(ReadOnlySpan< char > source, ReadOnlySpan< char > value)
static bool EqualsIgnoreCase(ref char charA, ref char charB, int length)
static int LastIndexOfOrdinalIgnoreCase(ReadOnlySpan< char > source, ReadOnlySpan< char > value)
static int CompareStringIgnoreCase(ref char strA, int lengthA, ref char strB, int lengthB)
static readonly TextInfo Invariant
static ReadOnlySpan< char > TrimEnd(this ReadOnlySpan< char > span, ReadOnlySpan< char > trimChars)
static int CompareTo(this ReadOnlySpan< char > span, ReadOnlySpan< char > other, StringComparison comparisonType)
static int ToUpperInvariant(this ReadOnlySpan< char > source, Span< char > destination)
static bool Contains< T >(this Span< T > span, T value)
static int IndexOf(this ReadOnlySpan< char > span, ReadOnlySpan< char > value, StringComparison comparisonType)
static int IndexOf< T >(this Span< T > span, T value)
static Memory< T > TrimEnd< T >(this Memory< T > memory, T trimElement)
static int ClampStart(ReadOnlySpan< char > span)
static bool Contains(this ReadOnlySpan< char > span, ReadOnlySpan< char > value, StringComparison comparisonType)
static Span< char > TrimEnd(this Span< char > span)
static bool TryWrite(this Span< char > destination, [InterpolatedStringHandlerArgument("destination")] ref TryWriteInterpolatedStringHandler handler, out int charsWritten)
static void Reverse< T >(this Span< T > span)
static ReadOnlySpan< char > AsSpan(this string? text, int start)
static ReadOnlySpan< char > Trim(this ReadOnlySpan< char > span, ReadOnlySpan< char > trimChars)
static Memory< T > TrimStart< T >(this Memory< T > memory, T trimElement)
static bool Equals(this ReadOnlySpan< char > span, ReadOnlySpan< char > other, StringComparison comparisonType)
static void Sort< T >(this Span< T > span)
static ReadOnlyMemory< char > TrimStart(this ReadOnlyMemory< char > memory)
static int LastIndexOf< T >(this Span< T > span, T value)
static bool EndsWith(this ReadOnlySpan< char > span, ReadOnlySpan< char > value, StringComparison comparisonType)
static ReadOnlyMemory< char > AsMemory(this string? text, Range range)
static bool Overlaps< T >(this Span< T > span, ReadOnlySpan< T > other)
static bool StartsWithOrdinalIgnoreCase(this ReadOnlySpan< char > span, ReadOnlySpan< char > value)
static bool StartsWith< T >(this Span< T > span, ReadOnlySpan< T > value)
static bool IsWhiteSpace(this ReadOnlySpan< char > span)
static ReadOnlyMemory< char > AsMemory(this string? text, int start, int length)
static SpanRuneEnumerator EnumerateRunes(this ReadOnlySpan< char > span)
static int LastIndexOf(this ReadOnlySpan< char > span, ReadOnlySpan< char > value, StringComparison comparisonType)
static bool EqualsOrdinal(this ReadOnlySpan< char > span, ReadOnlySpan< char > value)
static bool EndsWithOrdinalIgnoreCase(this ReadOnlySpan< char > span, ReadOnlySpan< char > value)
static int ToLowerInvariant(this ReadOnlySpan< char > source, Span< char > destination)
static void Sort< TKey, TValue >(this Span< TKey > keys, Span< TValue > items)
static int ClampEnd(ReadOnlySpan< char > span, int start)
static bool EndsWith< T >(this Span< T > span, ReadOnlySpan< T > value)
static ReadOnlySpan< char > AsSpan(this string? text, int start, int length)
static bool EqualsOrdinalIgnoreCase(this ReadOnlySpan< char > span, ReadOnlySpan< char > value)
static Span< T > AsSpan< T >(this T[]? array, int start)
static Memory< char > TrimStart(this Memory< char > memory)
static bool SequenceEqual< T >(this Span< T > span, ReadOnlySpan< T > other)
static SpanLineEnumerator EnumerateLines(this Span< char > span)
static Memory< T > Trim< T >(this Memory< T > memory, T trimElement)
static int IndexOfAny< T >(this Span< T > span, T value0, T value1)
static int ToUpper(this ReadOnlySpan< char > source, Span< char > destination, CultureInfo? culture)
static Memory< char > Trim(this Memory< char > memory)
static void Sort< TKey, TValue, TComparer >(this Span< TKey > keys, Span< TValue > items, TComparer comparer)
static int ClampEnd< T >(ReadOnlySpan< T > span, int start, T trimElement)
static ReadOnlySpan< char > TrimEnd(this ReadOnlySpan< char > span)
static Memory< T > AsMemory< T >(this T[]? array)
static Span< char > Trim(this Span< char > span)
static ReadOnlySpan< char > AsSpan(this string? text)
static ReadOnlyMemory< char > AsMemory(this string? text, Index startIndex)
static void Sort< T, TComparer >(this Span< T > span, TComparer comparer)
static int BinarySearch< T, TComparable >(this Span< T > span, TComparable comparable)
static int ClampStart< T >(ReadOnlySpan< T > span, T trimElement)
static SpanRuneEnumerator EnumerateRunes(this Span< char > span)
static int SequenceCompareTo< T >(this Span< T > span, ReadOnlySpan< T > other)
static Memory< char > TrimEnd(this Memory< char > memory)
static void CopyTo< T >(this T[]? source, Span< T > destination)
static ReadOnlySpan< char > TrimEnd(this ReadOnlySpan< char > span, char trimChar)
static ReadOnlyMemory< char > AsMemory(this string? text, int start)
static bool TryWrite(this Span< char > destination, IFormatProvider? provider, [InterpolatedStringHandlerArgument(new string[] { "destination", "provider" })] ref TryWriteInterpolatedStringHandler handler, out int charsWritten)
static int ToLower(this ReadOnlySpan< char > source, Span< char > destination, CultureInfo? culture)
static ReadOnlySpan< char > TrimStart(this ReadOnlySpan< char > span, ReadOnlySpan< char > trimChars)
static int BinarySearch< T >(this Span< T > span, IComparable< T > comparable)
static int BinarySearch< T, TComparer >(this Span< T > span, T value, TComparer comparer)
static Span< char > TrimStart(this Span< char > span)
static ReadOnlySpan< char > TrimStart(this ReadOnlySpan< char > span, char trimChar)
static ReadOnlySpan< char > TrimStart(this ReadOnlySpan< char > span)
static bool StartsWith(this ReadOnlySpan< char > span, ReadOnlySpan< char > value, StringComparison comparisonType)
static SpanLineEnumerator EnumerateLines(this ReadOnlySpan< char > span)
static ReadOnlyMemory< char > AsMemory(this string? text)
static int LastIndexOfAny< T >(this Span< T > span, T value0, T value1)
static ReadOnlySpan< char > Trim(this ReadOnlySpan< char > span, char trimChar)
static ReadOnlyMemory< char > Trim(this ReadOnlyMemory< char > memory)
static ReadOnlyMemory< char > TrimEnd(this ReadOnlyMemory< char > memory)
static ReadOnlySpan< char > Trim(this ReadOnlySpan< char > span)
static unsafe ref byte GetArrayDataReference(Array array)
static string InvalidOperation_SpanOverlappedOperation
static bool Contains(ref byte searchSpace, byte value, int length)
static int LastIndexOfAny(ref byte searchSpace, byte value0, byte value1, int length)
static int IndexOf(ref byte searchSpace, int searchSpaceLength, ref byte value, int valueLength)
static unsafe int SequenceCompareTo(ref byte first, int firstLength, ref byte second, int secondLength)
static int IndexOfAny(ref byte searchSpace, byte value0, byte value1, int length)
static unsafe bool SequenceEqual(ref byte first, ref byte second, nuint length)
static int LastIndexOf(ref byte searchSpace, int searchSpaceLength, ref byte value, int valueLength)
static void ThrowArrayTypeMismatchException()
static void ThrowArgumentOutOfRangeException(System.ExceptionArgument argument)
static void ThrowArgumentNullException(string name)
static void ThrowArgumentException(ExceptionResource resource)
static void ThrowArgumentException_OverlapAlignmentMismatch()
override bool Equals([NotNullWhen(true)] object? value)
bool AppendLiteral(string value)
bool AppendFormatted(ReadOnlySpan< char > value)
bool AppendFormatted(object? value, int alignment=0, string? format=null)
readonly bool _hasCustomFormatter
bool AppendFormatted(string? value)
readonly Span< char > _destination
bool AppendFormatted< T >(T value)
TryWriteInterpolatedStringHandler(int literalLength, int formattedCount, Span< char > destination, IFormatProvider? provider, out bool shouldAppend)
TryWriteInterpolatedStringHandler(int literalLength, int formattedCount, Span< char > destination, out bool shouldAppend)
bool TryAppendOrInsertAlignmentIfNeeded(int startingPos, int alignment)
bool AppendFormatted(string? value, int alignment=0, string? format=null)
bool AppendStringDirect(string value)
bool AppendFormatted(ReadOnlySpan< char > value, int alignment=0, string? format=null)
readonly IFormatProvider _provider
bool AppendCustomFormatter< T >(T value, string format)
static bool HasCustomFormatter(IFormatProvider provider)
Span< T > Slice(int start)