Пример #1
0
        public int Compare(byte[] key)
        {
            int minLen = Math.Min(key.Length, m_key.Length);
            var cut    = key.AsSpan().Slice(0, minLen);

            return(MemoryExtensions.SequenceCompareTo <byte>(m_key, cut));
        }
Пример #2
0
 public int Compare([AllowNull] byte[] x, [AllowNull] byte[] y)
 {
     return(MemoryExtensions.SequenceCompareTo <byte>(x, y));
 }
Пример #3
0
 public int CompareTo(UnicodeSequence other)
 {
     return(MemoryExtensions.SequenceCompareTo <Codepoint>(_codepoints, other._codepoints));
 }
Пример #4
0
 public int CompareTo(BitVector other) =>
 Length != other.Length ? Length.CompareTo(other.Length) :
 MemoryExtensions.SequenceCompareTo(new ReadOnlySpan <ulong>(_blocks), new ReadOnlySpan <ulong>(other._blocks));