System.Collections.Immutable by Microsoft

<PackageReference Include="System.Collections.Immutable" Version="9.0.0-preview.7.24405.7" />

.NET API 259,856 bytes

 OrdinalStringFrozenDictionary_LeftJustifiedSubstring<TValue>

using System.Collections.Generic; using System.Runtime.CompilerServices; namespace System.Collections.Frozen { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(new byte[] { 0, 1 })] internal sealed class OrdinalStringFrozenDictionary_LeftJustifiedSubstring<[System.Runtime.CompilerServices.Nullable(2)] TValue> : OrdinalStringFrozenDictionary<TValue> { internal OrdinalStringFrozenDictionary_LeftJustifiedSubstring(string[] keys, TValue[] values, IEqualityComparer<string> comparer, int minimumLength, int maximumLengthDiff, int hashIndex, int hashCount) : base(keys, values, comparer, minimumLength, maximumLengthDiff, hashIndex, hashCount) { } [return: System.Runtime.CompilerServices.IsReadOnly] private protected override ref TValue GetValueRefOrNullRefCore(string key) { return ref base.GetValueRefOrNullRefCore(key); } [return: System.Runtime.CompilerServices.IsReadOnly] private protected override ref TValue GetValueRefOrNullRefCore<TAlternateKey>(TAlternateKey key) { return ref base.GetValueRefOrNullRefCore(key); } [System.Runtime.CompilerServices.NullableContext(2)] private protected override bool Equals(string x, string y) { return string.Equals(x, y); } [System.Runtime.CompilerServices.NullableContext(0)] private protected override bool Equals(ReadOnlySpan<char> x, [System.Runtime.CompilerServices.Nullable(2)] string y) { return MemoryExtensions.SequenceEqual<char>(x, y.AsSpan()); } private protected override int GetHashCode(string s) { return Hashing.GetHashCodeOrdinal(s.AsSpan(base.HashIndex, base.HashCount)); } [System.Runtime.CompilerServices.NullableContext(0)] private protected override int GetHashCode(ReadOnlySpan<char> s) { return Hashing.GetHashCodeOrdinal(s.Slice(base.HashIndex, base.HashCount)); } } }