public bool EndsWith(Utf8String other) { var otherLength = other.Length; var offset = Length - otherLength; return(offset >= 0 && ByteStringFunctions.Equals(other.Path, otherLength, Path + offset, otherLength)); }
public bool Equals(Utf8String?other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(_crc32 == other._crc32 && ByteStringFunctions.Equals(_path, Length, other._path, other.Length)); }
public bool EqualsCi(Utf8String?other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if ((IsAsciiLowerInternal ?? false) && (other.IsAsciiLowerInternal ?? false)) { return(_crc32 == other._crc32 && ByteStringFunctions.Equals(_path, Length, other._path, other.Length)); } return(ByteStringFunctions.AsciiCaselessEquals(_path, Length, other._path, other.Length)); }
public bool StartsWith(Utf8String other) { var otherLength = other.Length; return(otherLength <= Length && ByteStringFunctions.Equals(other.Path, otherLength, Path, otherLength)); }