Exemple #1
0
    public int CompareTo(Utf8String?other)
    {
        if (ReferenceEquals(this, other))
        {
            return(0);
        }

        if (ReferenceEquals(null, other))
        {
            return(1);
        }

        return(ByteStringFunctions.Compare(_path, Length, other._path, other.Length));
    }
Exemple #2
0
    public int CompareToCi(Utf8String?other)
    {
        if (ReferenceEquals(null, other))
        {
            return(0);
        }

        if (ReferenceEquals(this, other))
        {
            return(1);
        }

        if ((IsAsciiLowerInternal ?? false) && (other.IsAsciiLowerInternal ?? false))
        {
            return(ByteStringFunctions.Compare(_path, Length, other._path, other.Length));
        }

        return(ByteStringFunctions.AsciiCaselessCompare(_path, Length, other._path, other.Length));
    }