Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Microsoft.​Extensions.​Primitives.​StringSegmentComparer
Assembly: Microsoft.Extensions.Primitives
Inheritance: object → StringSegmentComparer
Implemented Interfaces
- System.​Collections.​Generic.​IComparer`1
- System.​Collections.​Generic.​IEqualityComparer`1
Compares two <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> objects.
Properties
public static
StringSegmentComparer
Ordinal
Gets a <see cref="T:Microsoft.Extensions.Primitives.StringSegmentComparer" /> object that performs a case-sensitive ordinal <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> comparison.
public static
StringSegmentComparer
OrdinalIgnoreCase
Gets a <see cref="T:Microsoft.Extensions.Primitives.StringSegmentComparer" /> object that performs a case-insensitive ordinal <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> comparison.
Methods
public
int
Compare​(StringSegment x,
StringSegment y)
Compares two <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> objects and returns an indication of their relative sort order.
Returns A 32-bit signed integer that indicates the lexical relationship between the two comparands.
x
The first <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> to compare.
y
The second <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> to compare.
public
bool
Equals​(StringSegment x,
StringSegment y)
Determines whether two <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> objects are equal.
Returns <see langword="true" /> if the two <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> objects are equal; otherwise, <see langword="false" /> .
x
The first <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> to compare.
y
The second <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> to compare.
public
int
GetHashCode​(StringSegment obj)
Returns a hash code for a <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> object.
Returns A hash code for a <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> , suitable for use in hashing algorithms and data structures like a hash table.
obj
The <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> to get a hash code for.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object